我正在尝试设置干净的URL和从同一index.php页面提供的自定义404页面。干净的网址正在运行,但404不是,我在哪里错了?
ErrorDocument 404 /index.php?p=404
AddType application/x-httpd-php .rss
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9-\w]+)$ index.php?p=$1
RewriteRule ^([a-zA-Z0-9-\w]+)/$ index.php?p=$1
SetEnvIfNoCase Referer "^http://www.domain.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://www.domain.com$" locally_linked=1
SetEnvIfNoCase Referer "^http://domain.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://domain.com$" locally_linked=1
SetEnvIfNoCase Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
Order Allow,Deny
Allow from env=locally_linked
</FilesMatch>