Wordpress 3.8.1多站点子目录WP-Admin 404错误 - 尝试了一切

时间:2014-03-21 10:37:13

标签: wordpress .htaccess http-status-code-404

域名是www.sandersonathletics.org

Wordpress 3.8.1,具有子目录的多站点。

在新的子目录网站上标识出现的错误; www.sandersonathletics.org/football - 未格式化 AND www.sandersonathletics.org/football/wp-admin 404错误

  1. 我已经验证.htaccess文件与Wordpress中的文件匹配。
  2. 我已经验证了.htaccess(public_html root)
  3. 的适当位置
  4. 我已经验证了wp-config文件,并且多站点数据的位置在正确的位置,我已经检查了那里有什么。
  5. 我已经查看了mysql数据库中的条目以及www。在wp-config,数据库等中匹配(主持人建议这个)
  6. 我已将插件目录重命名为plugin-bak以调试插件问题。那没有效果。
  7. 我目前托管Dreamhost共享服务器。
  8. 的.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>
    

1 个答案:

答案 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

你有它!测试你的网站。

相关问题