开发者

ErrorDocument 404 just shows "404"

开发者 https://www.devze.com 2023-01-23 19:29 出处:网络
I have setted up my .htaccess with some bundles of rewrites, although when I go to an invalid directory which the ErrorDocument 404 is already set up, it just shows \"404\" on the page, nothing else,

I have setted up my .htaccess with some bundles of rewrites, although when I go to an invalid directory which the ErrorDocument 404 is already set up, it just shows "404" on the page, nothing else, just a plain text with "404".

RewriteEngine on

RewriteBase /
RewriteRule ^404/?$ 404.php

ErrorDocument 404 404

Why doesn't it show the 404 page, if I go to 404.php or http://www.mydomain.com/404 it shows just fine, wh开发者_运维技巧y won't it show the page?


You need to reformat your .htaccess, see: http://www.javascriptkit.com/howto/htaccess2.shtml

The correct line is:

ErrorDocument 404 /errors/notfound.html
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号