我正在尝试为public_html的子文件夹分别设置404页面。子文件夹的.htaccess读取:
ErrorDocument 404 /subfolder/404.html
但子文件夹中的404错误只是500内部服务器错误,并带有消息
"Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."
我认为这可能是由于root的.htaccess混乱所致。根文件夹中有一个Wordpress安装,所以
# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Set PHP handler to application/x-httpd-phpbeta on Mon Jan 11 15:10:53 MST 2016.
是我得到的。我不能真正做出它的正面或反面,但为什么它会阻止我的.htaccess工作呢?