I've seen a few questions like this on here, but no answer seems to work. I just can't seem to figure this out. Here is my code:
# enable basic rewriting RewriteEngine on # enable symbolic links Options +FollowSymLinks # Primary Domain - Force the use of "https" RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] # Primary Domain - Force the use of "www" RewriteCond %{http_host} ^example.org [nc] RewriteRule ^(.*)$ https://www.example.org/$1 [r=301,nc] # Primary Domain - .com to .org RewriteCond %{HTTP_HOST} ^example.com$ [NC] RewriteRule ^(.*)$ https://www.example.org/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ https://www.example.org/$1 [R=301,L] # Primary Domain - .net to .org RewriteCond %{HTTP_HOST} ^example.net$ [NC] RewriteRule ^(.*)$ https://www.example.org/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.example.net$ [NC] RewriteRule ^(.*)$ https://www.example.org/$1 [R=301,L] So whenever I go to www.example.org or http://www.example.org it will NOT redirect. This is what is frustrating me. If I go to example.org or any of the other redirects, it works though. Am I setting this up wrong?
Also, where it says "HTTP_HOST", do I leave it as is? Like do I replace it with my http host?