我有一个非wordpress站点,我在子目录中安装了wordpress。
www.example.com/wordpress/
我在wordpress文件夹中创建了一个htaccess文件(我拥有它的所有内容)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress并在index.php (在wordpress文件夹中)中进行了此更改。
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . './wordpress/wp-blog-header.php' );管理员工作正常,但当尝试访问网站时,它会给我一个错误500。我遗漏了什么?
Aclaration:我想在这个网址www.example.com/ wordpress /中使用wordpress,因为我在根目录中还有其他内容。
发布于 2016-10-18 16:01:11
假设您已经更新了permalinks(或复制了它提供的htaccess文件),请查看您的错误日志,因为错误500会在日志中产生错误。
对于Linux和Mac上的Apache服务器,错误日志可以在:/var/log/apache2/error_log中找到。
发布于 2017-12-06 20:31:36
错误500是内部服务器错误,WordPress中的内部服务器错误通常是由插件和/或主题函数引起的。据我们所知,导致WordPress中内部服务器错误的其他可能原因是:
可能的解决方案:
发布于 2019-05-29 17:38:58
从最后一条规则中删除/wordpress (RewriteBase保持不变)。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPresshttps://stackoverflow.com/questions/40111501
复制相似问题