Quote:
Originally Posted by mopek1
Thanks everyone for the replies. It's appreciated.
Two questions:
For this code: "RewriteCond %{HTTPS} off" I've seen a variation where it says "on" instead off "off" at the end. What does that even mean and which is correct?
Also, does my domain name fit anywhere into any of the htaccess codes in the examples above? Or do I copy and paste the code as is.
Like I said, I've seen many variations and just want to make sure it's right.
|
1 - RewriteCond %{HTTPS} off => if requested url is http, do what follows
RewriteCond %{HTTPS} on => if requested url is https, do what follows
2 - You don't need enter your domain name in any of the htaccess entries in this thread. The ones I posted should 301 the following to
https://www.yourdomain.[tld]:
http://yourdomain.[tld]
http://www.yourdomain.[tld]
www.yourdomain.[tld]
https://yourdomain.[tld]
If anything you add to .htaccess causes an issue, removing what you added should fix it in seconds.
As plsureking put, the htaccess should have the RewriteEngine On line first.