admin管理员组文章数量:1122846
So I have setup multisite as per the WordPress website page:
I'm using the latest WordPress 4.8.
Setup
example
sub.example
All requests for the subdomain for the dashboard and the site give a
403 - forbidden You don't have permission to access / on this server.
.htaccess
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]
The permissions are as WordPress - strict
, which work normally:
sudo find . -type d -exec chmod -R 755 {} \;; sudo find . -type f -exec chmod 644 {} \;; sudo chmod 444 wp-config.php .htaccess ; sudo chmod -R 755 wp-content ; sudo chmod -R 775 wp-content/uploads/ ; sudo chgrp -R admin . && sudo chown -R admin:www-data wp-content
I have setup subdomains on my server and pointed the document roots to the main website example
.
I've searched for hours as to why this isn't working but can't seem to find a solution... can anyone help?
So I have setup multisite as per the WordPress website page: https://codex.wordpress.org/Create_A_Network
I'm using the latest WordPress 4.8.
Setup
example.com
sub.example.com
All requests for the subdomain for the dashboard and the site give a
403 - forbidden You don't have permission to access / on this server.
.htaccess
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]
The permissions are as WordPress - strict
, which work normally:
sudo find . -type d -exec chmod -R 755 {} \;; sudo find . -type f -exec chmod 644 {} \;; sudo chmod 444 wp-config.php .htaccess ; sudo chmod -R 755 wp-content ; sudo chmod -R 775 wp-content/uploads/ ; sudo chgrp -R admin . && sudo chown -R admin:www-data wp-content
I have setup subdomains on my server and pointed the document roots to the main website example.com
.
I've searched for hours as to why this isn't working but can't seem to find a solution... can anyone help?
Share Improve this question edited Jul 22, 2017 at 23:05 MrWhite 3,8911 gold badge20 silver badges23 bronze badges asked Jun 25, 2017 at 14:38 JamieJamie 1611 silver badge6 bronze badges 3- 1 I fixed it by adding the correct path in the documentroot variable in the relevant apache conf file. – Jamie Commented Jul 22, 2017 at 21:01
- You should add the relevant solution as an answer - it might help others in the future. – MrWhite Commented Jul 22, 2017 at 21:54
- Does this answer your question? Subdomain multisite gives 404 on sub sites – bueltge Commented Sep 9, 2021 at 6:33
1 Answer
Reset to default 0https://wordpress.stackexchange.com/a/135740/141068
I used the above link to correct my issue.
You can check your wildcard subdomain to be pointing to the same folder as that of the main Wordpress installation folder.
For example, if example.com
is installed on public_html/example.com
, *.example.com
should be added to the same public_html/example.com
.
本文标签: htaccessMultisite Subdomains result in 403 Forbidden
版权声明:本文标题:htaccess - Multisite Subdomains result in 403 Forbidden 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736282697a1926727.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论