比如说
wp.jx163.com 是正常显示如果说wp.jx163.com/123123123123.html 这样输入的话就会说 不存在我想让这些不存在的 都指向 主页wp.jx163.com 不知道怎么弄 大家帮帮忙
wp.jx163.com 是正常显示如果说wp.jx163.com/123123123123.html 这样输入的话就会说 不存在我想让这些不存在的 都指向 主页wp.jx163.com 不知道怎么弄 大家帮帮忙
如果是apache,不知道有没有页面不存在时显示自己指定的页面的配置没有
里面有
#ErrorDocument 404 /missing.html 这个参数的设置 我不确定是不是在这里改```` 因为这个是要上服务器改的 所以我不敢乱试`````
利用这个模块的功能,加一条rewrite规则就可以了,比如:这条规则就是把所有类似
wp.jx163.com/123123123123.html 的URL都指向wp.jx163.com/index.htmlRewriteRule ^(.*).html$ index.html
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 http://wp.jx163.com/
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
404改成了 这个url 但是 我本地测试 随便打个url 还是跳不到 指定的URL啊
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
ErrorDocument 500 "The server made a boo boo."
ErrorDocument 404 http://wp.jx163.com
ErrorDocument 404 "/cgi-bin/missing_handler.pl"
ErrorDocument 402 http://www.example.com/subscription_info.html
##
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
EnableMMAP off
EnableSendfile off
apache\conf\httpd.conf 里面加 ErrorDocument 404 /error.html 然后再根目录htdocs下 建了一个 error.html页面 在IE中随便输入个 http://localhost/error111111.html 还是跳转不到那个错误页面 请问问题出在哪里了 帮帮忙吧。。急啊 ~~~~~~~~# Some examples:
#ErrorDocument 500 "The server made a boo boo."
ErrorDocument 404 /error.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#