【发布时间】:2012-05-31 05:27:55
【问题描述】:
我想为一些 HTTP 错误使用自定义页面,所以我使用 .htaccess 文件。同时我也想用URL重写,但是不行,不知道为什么。
这是我的 .htaccess :
#Rewrite options
RewriteEngine On # Turn on the rewriting engine
#Error
RewriteRule ^error/([0-9]{3})/?$ index.php?page=error-$1 [NC,L]
#Other options
ErrorDocument 403 error/403
ErrorDocument 404 error/404
<Files .htaccess>
order allow,deny
deny from all
</Files>
IndexIgnore *
Options All -Indexes
【问题讨论】:
标签: http .htaccess url-rewriting errordocument