Forum Moderators: coopster

Message Too Old, No Replies

Html 404 error page. PHP Help?

Using a 404 error page but with PHP content

         

jackgordon

5:52 pm on May 31, 2009 (gmt 0)

10+ Year Member



Currently our website has no error pages.

I am wanting to design a 404 page that has the same look and feel as that of my ecommerce website. Unfortunately, my website is PHP based and the header, navigation menu and footer are all dynamically driven from 3 seperate php files.

I have tried, unsuccessfully, to create a 404.html error page. When the page is executed, the php elements do not display.

Does anyone have any advice to give me as to how I can proceed further?

Thanks!

(apologies if this is in the incorrect forum section)

g1smd

6:35 pm on May 31, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Create a /404.php page instead, and use the ErrorDocument directive to specify its name.

Beware of using relative links from within an error page. The browser resolves the location of those, relative to the URL it requested when it received the error.

jackgordon

6:55 pm on May 31, 2009 (gmt 0)

10+ Year Member



Thank you!
I did just as you said, editing my htaccess file. Works like a dream, thankyou!