简体   繁体   中英

WildCard Domains without subdomain mapping

So I am working on WordPress Multisite installation, went to setup the subdomain mapping for the wildcard domains. *.example.com and found the hosting provider this person is using doesn't support wildcard domains. Now I am wondering if their is some sort of work around maybe using .htaccess I started trying somethings but could use some help this is where I am at:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$   [NC]
RewriteCond %{HTTP_HOST} !^www\.example\.com$  [NC]
RewriteRule ^ http://example.com/index.php  [L,R]

Kind of hitting a wall, any help would be greatly appreciated!

If your hosting provider doesn't support wildcard domains you have two options.

  1. switch hoster
  2. manually add the subdomains when you create a sub-site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM