WordPress non-www redirects
-
Hi guys,
I’m having a play about with getting WordPress working on my local Synology NAS but having some problems trying to get it working with both www and non-www.
1) I’m hosting with 1&1 and have created a domain.co.uk subdomain (www) with a custom cname (to my NAS) xxxx.dscloud.me.
2) On my NAS I have created 2 alias’ one for https://www.domain.co.uk and one for domain.co.uk
3) Within WordPress I have configured the settings to run on www.
Result: A working site on https://www.domain.co.uk
Next steps: Trying to get the https://domain.co.uk to work.
1) Pointed domain.co.uk to the same custom cname
2. I have already setup the nas with an alias to the non-www to the same folderResult: Too many redirects error.
Additional things tried:
– Modifying the .htaccess with the following rewrite:
RewriteCond %{HTTP_HOST} ^domain\.co.uk [NC]
RewriteRule (.*) https://www.domain.co.uk/$1 [L,R=301]Result: Still Too many redirects error
– Modifying the 1&1 domain to forward to https://www.domain.co.uk
Result: Redirects fine but user loses context. i.e. https://domain.co.uk/wp-admin redirects back to https://www.domain.co.uk where I’d want it load normally but rewrite the url.
Any ideas what I may be doing wrong????
Thanks!
Mike
- The topic ‘WordPress non-www redirects’ is closed to new replies.