I have 3 different domains for a single WordPress project (for example, www.aaa, www.bbb, wwwc). www.aaa is the main domain. The problem is, whenever I access the page that WordPress did the URL guessing on other domains, it will redirect to the main domain with 301 code. Here is an example of the current situation:
www.aaa/en --> www.aaa/en/
www.bbb/en --> www.aaa/en/
wwwc/location/ --> www.aaa/aboutus/location/
What my expectation is it will redirect according to its own domain, like:
www.bbb/en --> www.bbb/en/
I am not sure which part should I check on. I really appreciate anyone's help.
I have 3 different domains for a single WordPress project (for example, www.aaa, www.bbb, wwwc). www.aaa is the main domain. The problem is, whenever I access the page that WordPress did the URL guessing on other domains, it will redirect to the main domain with 301 code. Here is an example of the current situation:
www.aaa/en --> www.aaa/en/
www.bbb/en --> www.aaa/en/
wwwc/location/ --> www.aaa/aboutus/location/
What my expectation is it will redirect according to its own domain, like:
www.bbb/en --> www.bbb/en/
I am not sure which part should I check on. I really appreciate anyone's help.
Share Improve this question asked Jan 11, 2022 at 4:32 Muhaafidz Md SaufiMuhaafidz Md Saufi 11 Answer
Reset to default 0This is intended behaviour for WordPress install and will use the value set in the siteurl
entry in the options table.
What you want to achieve will probably have to be done with Nginx or Apache using Rewrite
s, or proxy_pass
(for Nginx) or RewriteRule
and ProxyPass
(Apache)