FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Using PHP in error pages





thinkfacility
Hi, I was wondering if it was possible to use PHP to make a 404 error page? It's saved as a .shtml file so it doesn't parse the php coding correctly as of now...
rvec
what if you save it in the root as .php and make a .htaccess file in your root dir with this line in it:
Code:
ErrorDocument 404 /error404.php

or any other name instead of error404.php

BTW with root I mean public_html.
thinkfacility
Ah perfect! That did the trick. In fact, that was almost too easy, thanks! Very Happy
Mememe
Yeah, it's .htaccess that does redirects 404 errors to the 404 pages. Cool
Related topics
[tutor] How to protect images without htaccess using PHP
Custom error pages using .htaccess
how can i have 2 sets of error pages
Using PHP
Includ Images using PHP.
creating error pages
How to start using PHP? Help!
Website Designing using PHP
Custom Error Pages
how can i setup a page break for printer on html using php ?
PHP Error Pages
Reading word documents using PHP?
Using php to change content of a .txt
Access Java 1.6 Web service using php client
Error pages
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Frihost Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.