I've searched the forums and tried some things, but I can't seem to get this to work.
I need to remove the www whenever there's an https:// call. How would this be accomplished via .htaccess and mod_rewrite?
I tried these, but I can't seem to get the desired results
- Code: Select all
RewriteCond %{HTTP_HOST} ^www.domain.com [nocase]
RewriteRule ^(.*) https://domain.com/$1 [last,redirect=301]
- Code: Select all
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*) https://domains.com/$1 [R=301,L]
Thanks in advance for any ideas.
-Ray