简体   繁体   中英

403 Forbidden Error display instead of a customised Error 404 page

i'm having this issue with my server, i'm trying to do a Error 404 display, but whn i go to an invalid URL i get this message.. Please where could the problem coming from?

        The requested URL /church/ffff.php     was not found on this server.

Additionallt, a 403 Forbidden error was        encountered while trying to use an           ErrorDocument to handle the request

thank you.

Whats your .htaccess look like?

You can add a custom handler like this:

In .htaccess (the top of it is best) ErrorDocument 404 404.php

似乎服务器没有权限访问404文件,要解决此问题,应将文件与htaccess放在同一文件夹中,而不要编写完整路径(/c:wamp/www/church/404.php),应该只写文件名-404.php

oh it's because the htaccess doesnt automaticly enabled on local host you need to do this:

  1. click on wamp icon
  2. apache->apache modules-> and enable rewrite_module

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM