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 /