Problems with non www to www redirect
-
Hello, I’m trying to redirect the non www version of my site to the www version to prevent any duplicate issues but can’t seem to get it quite right.
I have amended my .htaccess file with the following:
RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC] RewriteRule ^(.*)$ https://www.mydomain.co.uk/$1 [L,R=301]
This works to redirect the site but I end up with a load of trailing slashes at the end so it looks like this:
https://www.mydomain.co.uk//
I think it may be something to do with the WordPress permalink code but I’m not savvy enough with editing .htaccess to figure it out. Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problems with non www to www redirect’ is closed to new replies.