找不到404页面错误 [英] 404 page not found error

查看:604
本文介绍了找不到404页面错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是WAMP的服务器,我需要使用htaccess的改变404找不到网页的风格。我该怎么办呢?

未找到

所请求的网址/viewprofile.php在此服务器上找到。这里是我的htaccess的文件

  RewriteEngine叙述上
重写规则(*) - (。*)。?HTM $ viewprofile.php ID = $ 1
重写规则(。*)。HTM $ viewprofile.php?ID = $ 2
重写规则viewads(。*)\。HTM $ viewads.php?ID = $ 1
重写规则&AMP(*)(*)。?\ HTM $ homeads.php ID = $ 2
重写规则(。*)。HTM $ profile_city.php?ID = $ 1
重写规则(。*)。HTM $ profile_cast.php?ID = $ 1



RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME!-d
的RewriteCond%{REQUEST_FILENAME} \ PHP -f
重写规则^(。*)$ $ 1.PHP
 

解决方案

您可以读到的自定义错误响应

总之,使用这个指令:

 的ErrorDocument 404 /Lame_excuses/not_found.html
 

请确保您有 的AllowOverride 全部(或的FileInfo )的基础配置文件进行设置。

I am using a WAMP server and I need to change the "404 not found page" style using htaccess. How can I do it?

"Not Found

The requested URL /viewprofile.php was not found on this server".Here is my htaccess file

    RewriteEngine on
RewriteRule (.*)-(.*).htm$ viewprofile.php?id=$1
RewriteRule (.*).htm$ viewprofile.php?id=$2
RewriteRule viewads(.*)\.htm$ viewads.php?id=$1
RewriteRule (.*)&(.*)\.htm$ homeads.php?id=$2
RewriteRule (.*).htm$ profile_city.php?id=$1
RewriteRule (.*).htm$ profile_cast.php?id=$1



RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

解决方案

You may read official docs about Custom Error Responses

In short, use this directive:

ErrorDocument 404 /Lame_excuses/not_found.html 

Make sure you have AllowOverride All (or FileInfo)set in base config file.

这篇关于找不到404页面错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆