RT60 Calculator Posted January 18, 2012 Posted January 18, 2012 Hi all,Is it possible to use PHP pages as error handlers (e.g. 404, 500 etc) instead of the default SHTML pages? The rest of my site uses PHP, so this would make life a bit easier.Thanks in advance,Cal McLean
anush Posted January 18, 2012 Posted January 18, 2012 Yes you can check that in http://techstream.org
Titanom Posted January 18, 2012 Posted January 18, 2012 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.
anush Posted January 19, 2012 Posted January 19, 2012 This actually correct but in some server Apache i think you need to put like thiswhen 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 Steviehttp://techstream.or...gining/404_page You can make some creative pages for 404check mine http://techstream.org/404 for more check the above link
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now