0

尝试访问我的 wordpress 网站的 /wp-admin 页面时,我收到一个 Http 500 错误(仅限登录页面,所有其他页面都可以正常工作)

我注意到它还重定向到 wordpress 安装所在的子目录...假设这是问题的一部分?

例如...我去 /wp-admin 并最终到达 /wp/wp-login.php?redirect_to...。

我检查了 .htaccess 文件和 wp-config 是否有任何重定向,但看不到任何重定向。

知道什么会导致这种情况或我应该在哪里寻找/我应该寻找什么?我搜索了许多问题,文章等无济于事。

如果您有任何问题/需要更多信息,请告诉我。

谢谢!

编辑:这是 htaccess 文件的内容

# Added by the pair Networks Software Installation Manager
AddType application/x-httpd-php .php


# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html.gz -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html" [L]
</IfModule>

# END WPSuperCache

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>

# END WordPress
4

1 回答 1

0

检查数据库表 wp_options 和站点 URL 和基本 URL 应该是http://example.com 或者,您也可以在 wp-config.php 中定义站点 URL 和基本 URL

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
于 2019-12-10T09:21:47.037 回答