Simple .htaccess rewrite rule

ARUN Posted in HTACCESS
0

A simple .htaccess rule to test the redirect

Solution :  http://admin.webhostingdevelopment.com/viewtopic.php?f=83&t=72#p83

How to rewrite all the .htm requests to .php

RewriteEngine onRewriteCond %{THE_REQUEST} ^GET\s(.+)\.php [NC]
RewriteRule ^ %1.htm [R=301,L]RewriteRule ^(.*)\.htm$ /$1.php [L,NC]

How to rewrite a domain to another domain using .htaccess

ARUN Posted in HTACCESS
0

How to rewrite a domain to another domain using .htaccess

Solution : http://admin.webhostingdevelopment.com/viewtopic.php?f=83&t=73

Redirect arunp.in to google.com
[

RewriteEngine on
RewriteCond %{HTTP_HOST} ^arunp\.in$ [OR]
RewriteCond %{HTTP_HOST} ^www\.arunp\.in$
RewriteRule ^/?$ “http\:\/\/www\.google\.com\/” [R=301,L]
]

How to create a custom recursive php.ini file?

ARUN Posted in HTACCESS, PHP
0

SOLUTION :

http://admin.webhostingdevelopment.com/viewtopic.php?f=9&t=4&p=4&hilit=IfModule+mod_suphp.c#p4

Forcefully redirect webmail to https

ARUN Posted in HTACCESS, MAIL, Webmail
0

How to forcefully redirect squirrelmail to https

Go to installation directory

cd /var/www/html/squirrelmail-1.4.22/

vi .htaccess

 

DirectoryIndex index.php

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{SERVER_PORT}      !^443$
        RewriteRule ^(.*)$      https://%{SERVER_NAME}/squirrelmail/src/login.php [L,R=303]
</IfModule>

Getting Redirect error

ARUN Posted in ERROR, HTACCESS
0

Getting the following redirect error while trying to access a subdomain

=====================

[Thu Sep 23 17:45:19 2010] [error] [client 65.25.54.25] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

=====================

SOLUTION :   This can happen if : RewriteBase is not enabled in .htaccess. To enable that open .htaccess

vi .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /             ——> make sure this LINE IS PRESENT

<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /