404错误页面出现问题

时间:2014-01-07 11:51:51

标签: html .htaccess redirect http-status-code-404

我试图转移到404错误页面:

这是.htaccess文件:

Options +FollowSymLinks


RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.MYSITE\.co.uk [NC]
RewriteRule ^(.*)$ http://MYSITE.co.uk/$1 [R=301,L]

#enable hiding cfm extension
RewriteCond %{THE_REQUEST} \ /(.+/)?index(\.cfm)?(\?.*)?\  [NC]
RewriteRule ^(.+/)?index(\.cfm)?$ /%1 [R=301,L]

#RewriteCond %{ENV:REDIRECT_STATUS} ^$
#RewriteRule ^(.+)\.cfm$ /$1 [R=301,L]

RewriteCond %{SCRIPT_FILENAME}.html -f
RewriteRule [^/]$ %{REQUEST_URI}.cfm [QSA,L]

RewriteCond %{SCRIPT_FILENAME}.cfm -f
RewriteRule [^/]$ %{REQUEST_URI}.cfm [QSA,L]

ErrorDocument 404 /404.cfm

但是它没有指向404.cfm页面。

有什么建议吗?

0 个答案:

没有答案