最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

WordPress multi domain: page redirect to main domain whenever WordPress do the URL guessing issue

programmeradmin3浏览0评论

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 1
Add a comment  | 

1 Answer 1

Reset to default 0

This 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 Rewrites, or proxy_pass (for Nginx) or RewriteRule and ProxyPass (Apache)

发布评论

评论列表(0)

  1. 暂无评论