Hi,
I’m forcing HTTPS and removing WWW from my website but as soon as I enable the wp-admin .htaccess it overrides the forcing of non-WWW for some reason and I can’t figure out how to keep it forcing non-www
The rule that I am using in my root to force https and remove www is what you see below but I’ve tried various other rules but the same happens to all rules.
<IfModule mod_rewrite.c> # Force HTTPS & NON-WWW RewriteEngine On RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} !^website\.com$ [NC] RewriteRule ^ https://website.com%{REQUEST_URI} [R=301,L] </IfModule>
If I am using the above rule in my root and I enable the default wp-admin .htaccess file then visiting the link: https://www.website.com/wp-admin/admin.php
will not rewrite to https://website.com/wp-admin/admin.php
when I want it to do this.
On a side note, can I post a topic about a problem I am having with a subdomain copy of wordpress, I’m not sure if it’s a .htaccess rule or just a bug with wordpress and being that you guys are pretty damn good with .htaccess rules you might be able to advise.
Thanks