Jump to content

Php Error Pages


Recommended Posts

You can specify which documents respond to particular codes by adding them to a .htaccess file. Note that .htaccess files are generally inherited by child directories - so if you put it in your public_html directory (i.e. the top-level directory of your site), then all child directories should follow the rules too.

 

So to add custom 404 (Not Found) pages, you'd use something like:

ErrorDocument 404 /my-amazing-4oh4-page.php

 

When I say ".htaccess files are generally inherited by child directories..." this has just generally been in my experience; thinking about it, I actually don't know if that is related to how a given HTTPD is configured, whether it's default Apache behavior, or what. But it will most definitely apply to the directory in which the .htaccess file is located.

Link to comment
Share on other sites

This actually correct but in some server Apache i think you need to put like this

when i just add the single line code it did't worked from me on Stevie

 

<IfModule mod_rewrite.c>
RewriteEngine On ErrorDocument 404 /404.php
</IfModule>

 

just change the 404.php to your page

 

You can check this link once steve gets back on track as my website is on Stevie

http://techstream.or...gining/404_page

 

You can make some creative pages for 404

check mine http://techstream.org/404

 

for more check the above link

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...