multisite - WP Multi Site - configure Sub domain pointing to parent sub directory

I've a purchased a hosting plan from hostinger, but it seems they don't provide wild card subdomains. Now I wa

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745279601a4620215.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信