admin rewrite to ssl
Posted: Fri May 15, 2009 2:11 am
Hi,
I have done a rewrite that would automatically redirect when the user type http://localhost/cms/admin to https://localhost/cms/admin, but some parts inside admin are not working.
Anyother will be redirected to http.
VirtualHost
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} (.*) [NC]
RewriteRule ^/admin/(.*)$ https://%{SERVER_NAME}/admin/$1 [L,R]
VirtualHost
RewriteEngine On
RewriteOptions inherit
RewriteCond %{REQUEST_URI} !^/admin(.*) [NC]
RewriteRule (.*) http://%{SERVER_NAME}$1 [R]
Kindly help.
Thanks
I have done a rewrite that would automatically redirect when the user type http://localhost/cms/admin to https://localhost/cms/admin, but some parts inside admin are not working.
Anyother will be redirected to http.
VirtualHost
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} (.*) [NC]
RewriteRule ^/admin/(.*)$ https://%{SERVER_NAME}/admin/$1 [L,R]
VirtualHost
RewriteEngine On
RewriteOptions inherit
RewriteCond %{REQUEST_URI} !^/admin(.*) [NC]
RewriteRule (.*) http://%{SERVER_NAME}$1 [R]
Kindly help.
Thanks