Wednesday, 16 July 2014

Redirect HTTP to HTTPS using mod_rewrite

Redirect http to https htaccess


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond $1 !^children/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

</IfModule>

No comments:

Post a Comment