Forum Moderators: phranque
Was wondering if someone could help me with some .htaccess rules. I have a site where I redirect all requeset to http://example.com to http://www.example.com
What I want to do now though is redirect any requests to certain pages to a https version
e.g someone goes to http://www.example.com/index.php
redirect to [example.com...]
In terms of the index.php file I'd also need to redirect requests to / to the https version.
http://www.example.com/page2.php shouldn't redirect.
I'm not good with .htaccess so would also appreciate an explanation with any code. So far I have this to faciliate http:// to [www....]
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]