Wordpress multisite, domain mapping www issue

2019-08-17 16:09发布

Hey there, I have installed wordpress multisite and domain mapping plugin.

The problem is with the www...if i setup the multisite without www and i access the site without www everything works fine But if i access it without www, it reddirects to the main site. Any ideea why? Ty

标签: wordpress
2条回答
Lonely孤独者°
2楼-- · 2019-08-17 16:27

Maybe this could help you

http://wordpress.org/support/topic/plugin-wordpress-mu-domain-mapping-add-an-www-prefix?replies=7

Edit: Actually, I found a non-coding easier solution. In the 'Super Admins -> Domains' page, add both the www. and non-www. versions of the domain, but select the box of 'primary' for if you want to mainly use for www. or non-www. and both will be assigned to the blog.

查看更多
时光不老,我们不散
3楼-- · 2019-08-17 16:44

This is the setup that has worked for me:

  • Go to /wp-admin/network -> Settings -> Domain mapping:
    • Set your primary site domain (without www) on Server CNAME domain, leave IP empty
    • Uncheck remote login
    • check permanent redirect
    • check user domain mapping page
    • uncheck Redirect administration pages to site's original domain
    • uncheck Disable primary domain check
  • Go to /wp-admin/network/ -> setting -> Domains: Map each site to its domain (without www)

For each site that you want to default to www (except the primary)

  • Go /wp-admin/ -> Tools -> domain mapping
    • In Add new domain insert the site's domain (with www)
    • Check Primary domain for this blog

(Please note that you have to make sure beforehand that your domain is working with and without www)

查看更多
登录 后发表回答