【发布时间】:2015-09-17 02:00:36
【问题描述】:
我有一个自定义的 403 页面 disabled.php
我已将其添加到 .htaccess 但无法正常工作
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^notfound\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /notfound.php [L]
ErrorDocument 403 . /forbidden.php
</IfModule>
<Files 403.shtml>
order allow,deny
allow from all
</Files>
我也试过了:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^notfound\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /notfound.php [L]
</IfModule>
<Files forbidden.php>
order allow,deny
allow from all
</Files>
我错过了什么。 .htaccess 不是我的强项
【问题讨论】: