Hi there,
I'ma proper novice with php, hope this question isnt too daft. I'm trying to include header, footer and some generic content to an error404.html file. I can get the file working just fine if i directly reference it as a url, but when the server calls the file as result of a mis-spelt url with .php file extension it does not parse the php in error404.html, & directly outputs the file with the php as html source code.
Is there any fix for this problem at all??
thanks in advance folks,
ian
Using SSI in error404.html
Moderator: General Moderators
Using SSI in error404.html
Last edited by ian rush on Tue Jun 05, 2007 12:44 pm, edited 1 time in total.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
An article: http://www.phpfreaks.com/tutorials/21/0.php
More information on the configuration changes needed: http://httpd.apache.org/docs/1.3/custom-error.html
More information on the configuration changes needed: http://httpd.apache.org/docs/1.3/custom-error.html
thanks for the response -- I guess i didnt really explain my problem thoroughly enough, so i'll have another crack, hope this makes a bit more sense?In that case, it's probably just the fact that you use an HTML file. Try making an error404.php.
when i set up a 404.php error page, it only worked if I have an incorrect url without a .php extension (like http://www.abc/), if the incorrect url does have .php extension (http://www.abc.php), then the error404.php file is not returned, instead the hosting companys own 404 page shows.
My hosting people (1&1) say that this is why i should use error404.html page which works for all incorrect urls, which leads to the problem that i'm having with php not parsing.
any ideas at all?
Last edited by ian rush on Tue Jun 05, 2007 12:45 pm, edited 1 time in total.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm