开发者

.htaccess 404 redirect to php file

I am currently trying to create a .htaccess file that re开发者_如何学Cdirects to a php file if a error 404 occurred.

However, When I choose a php file it just displays the default 404 not found error, but if i change it to html it then works fine and displays my page.

What is wrong with this.

Thanks for your help


Sadly there isn't enough to go on here, but I can give you some questions to help you debug this (too much for a comment otherwise I would have done that):

  • If you navigate to the php file is it hosted through Apache correctly (when not being used as an ErrorDocument)?
  • Are there errors in your apache logs from trying to retrieve the php file as an error document?
  • Is the "default" 404 error the one from Apache or your browser?
  • If it's Apache's does it say there was an error retrieving the configured error document?
  • If it's the one from your browser is the php file large enough to not be om nom nommed by the browser (for example: 512 bytes in IE )?
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜