admin管理员组

文章数量:1417649

I've a purchased a hosting plan from hostinger, but it seems they don't provide wild card subdomains. Now I want to set up a multisite wp on hostinger in a subdomain format, not sub directories. When I set up multisite as sub-directories, it works fine, but it is not working for Subdomain format. I think it can be fixed by modifying the htaccess. Need your help to fix this. Here is the domain structure -

Parent domain - example [ Directory - user/domains/example/public_html/(wp files)]

Sub domain - abc.example [Directory - user/domains/example/public_html/abc]

Now if a request comes to abc.example, how can I redirect the request to parent domain so that WP can recognize and serve the files as Multisite.

example .htaccess -

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

# END WordPress

本文标签: multisiteWP Multi Siteconfigure Sub domain pointing to parent sub directory