lexo
asked on
How to use htaccess to force https on the homepage only
I want to force https:// on the index page only of a site.
Right now, I am using htaccess to append www to the url:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301]
How do I force ssl to only the index page? There is a login box on this page and I need it to be secure, but the rest of the pages, I dont want to force ssl (I will control the rest through navigation).
Right now, I am using htaccess to append www to the url:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301]
How do I force ssl to only the index page? There is a login box on this page and I need it to be secure, but the rest of the pages, I dont want to force ssl (I will control the rest through navigation).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.