Page 1 of 1

[solved] Default eeror files on IIS server

Posted: Wed Mar 23, 2005 8:29 am
by hairyjim
Hi All,

I know it is possible to modify the default error pages on IIS but I wsh to use php code within the pages to:

a) send me an email of the URL they were wanting
b) Read the requested URL string and suggest pages they may be looking for

Now I did a very simple error page with an echo on it to see if PHP code would work. It didn't. Obviously the page extension was .php and it just returned a blank page with no source in the "view source".

If I change the extension to htm, html etc (No php code) it displayed my custom error page.

I was wondering if there was some IIS option I needed to configure to allow for the execution of PHP in the custome error files?

Cheers
Jim

nothin

Posted: Wed Mar 23, 2005 5:05 pm
by method_man
just leave it saved as a .html

Posted: Wed Mar 23, 2005 7:38 pm
by Ambush Commander
PHP for Error messages is buggy plus you won't be able to send Content-Length headers (which may lead to IE superimposing their "friendly" error page on it).

thanks

Posted: Thu Mar 24, 2005 2:54 am
by hairyjim
Well thanks for the replies chaps.

It is a shame I cannot use PHP in the error files effectivly.

I will stick to a plain 404 error file.

Thanks anyway.

Jim