我遇到了永久.htaccess代码阻止自定义错误处理的问题。当我删除WordPress代码时,错误处理工作正常。WordPress .htaccess和ErrorDocument 400
这里是我的代码:
php_value memory_limit 96M
php_value upload_max_filesize 250M
php_value post_max_size 250M
# 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
ErrorDocument 400 /error.php
AddType application/msword doc
AddType application/vnd.ms-excel xls
AddType application/powerpoint ppt
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
有没有办法让WordPress的代码不变,仍然有400错误自定义错误文档?
由于提前,
斯科蒂
感谢您的答复。我添加了链接到我创建的页面,如下所示: ErrorDocument 400/page-name/ 这仍然会产生相同的结果。有没有不同的语法我缺少? – Scotty 2012-02-06 21:14:17
这应该解释我在说什么。 http://codex.wordpress.org/Creating_an_Error_404_Page – thenetimp 2012-02-07 04:34:30