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
admin rewrite to ssl Topic is solved
Re: admin rewrite to ssl
You can simply add an .htaccess inside admin directory (as seen here)
This works fine in all admin area.
Note:
You if are using module SiteMapMadeSimple you should edit your default template:
in extension->sitemap made simple>templates>sample (thanks to Robert Gruber)
change:
into:
Regards
blast
Code: Select all
# force all access to /admin to SSL protected page
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Note:
You if are using module SiteMapMadeSimple you should edit your default template:
in extension->sitemap made simple>templates>sample (thanks to Robert Gruber)
change:
Code: Select all
{$page->url}
Code: Select all
{$page->url|replace:"https":"http"}
Regards
blast