域名是www.sandersonathletics.org
Wordpress 3.8.1,具有子目录的多站点。
在新的子目录网站上标识出现的错误; www.sandersonathletics.org/football - 未格式化 AND www.sandersonathletics.org/football/wp-admin 404错误
的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
答案 0 :(得分:0)
在Ubuntu 16.04 WP 4.9.7和PHP7上测试的工作解决方案:
来源: https://wordpress.stackexchange.com/questions/167294/multisite-404-error-for-subdirectory
编辑此文件/etc/apache2/sites-enabled/.conf
使它看起来像这样:
suppressNavigable: true,
cellClass: 'no-border'
使其有效的部分是:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/>
Options FollowSymLinks
AllowOverride all
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
重启apache:
sudo service apache2 restart
你有它!测试你的网站。