473,394 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Custom Error Message Pages

I am having an issue with php and IIS6 in that I want a custom error page to
display when a page isn't found (error 404). If I do a test and enter
anything ending with .php it returns the "default", bog standard IE / IIS
error page. All other instances (.gif, .htm, <foldername> etc) route to the
custom error page.

What I need to know is where do I tell php the location of the custom error
page to ensure it displays the custom 404 page rather than the default one?

Any help appreciated

Chris
Mar 7 '06 #1
2 2369
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christopher Pettet wrote:
What I need to know is where do I tell php the location of the custom
error page to ensure it displays the custom 404 page rather than the
default one?


PHP does not care about custom error page locations: webservers do. Please
re-read the documentation for Apache, boa, IIS, or whatever webserver you
are running.

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.12-1-686 kernel, KDE3.5.0, and PHP
5.1.2-1 generating this signature.
Uptime: 22:46:55 up 1:22, 1 user, load average: 1.16, 0.80, 0.64

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEDf+r3jcQ2mg3Pc8RAgdTAJ9egT7XZ2jDQBHDjE7m1r 2P8VaumQCfXBeD
BYUJylZRwJJTJGrgqWAHLI8=
=EQNq
-----END PGP SIGNATURE-----
Mar 7 '06 #2
Can you please explain why it works for everything EXCEPT .php extensions?

Try these three links and you'll see what I mean...

http://mydvds.psiss.com/fred.htm <- works fine
http://mydvds.psiss.com/fred.php <- displays the default 404
http://mydvds.psiss.com/fred.asp <- works fine
"Iván Sánchez Ortega" <i.***************@rroba--mirame.punto.net> wrote in
message news:nm************@blackspark.escomposlinux.org.. .
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christopher Pettet wrote:
What I need to know is where do I tell php the location of the custom
error page to ensure it displays the custom 404 page rather than the
default one?


PHP does not care about custom error page locations: webservers do. Please
re-read the documentation for Apache, boa, IIS, or whatever webserver you
are running.

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.12-1-686 kernel, KDE3.5.0, and PHP
5.1.2-1 generating this signature.
Uptime: 22:46:55 up 1:22, 1 user, load average: 1.16, 0.80, 0.64

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEDf+r3jcQ2mg3Pc8RAgdTAJ9egT7XZ2jDQBHDjE7m1r 2P8VaumQCfXBeD
BYUJylZRwJJTJGrgqWAHLI8=
=EQNq
-----END PGP SIGNATURE-----

Mar 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve | last post by:
All -- This occasionally happens, and there's no set pattern on why this is... perhaps it happens a few times every few months or so. I have a custom ATL COM object that handles data from...
14
by: sinister | last post by:
I have some CGI programs that spit out error pages when the user enters illegal form input. These custom error pages, while informing the user of errors, are otherwise just standard web pages. ...
3
by: CoreyMas | last post by:
This is what i am trying to do I have a DAL that contains all of my database connections/reads etc. I have a separate GUI layer that has my web pages I would like to pass my exception errors...
3
by: Bubu | last post by:
Hello this is robert, I need some suggestion, I have a website, hosted in windows 2003 server,shared hosting. I would like to have a custom 404 error page, for missing files. In the help file of...
6
by: Nick Horrocks | last post by:
I have set up a custom error page for 404 errors. However the HTTP status code returned is 302 followed by 200, this causes search engines not to remove old pages from their index. How can I...
0
by: Rhys666 | last post by:
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages. Basically, my web application...
1
by: Laurie Dvorak | last post by:
I'm working on converting a website that currently is all static HTML pages to ASP.NET. Since people may have some of the HTML pages bookmarked, I want to give them a meaningful error message...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
8
by: Mark A. Sam | last post by:
Hello I am working locally with Visual Web Developer 2005 Express. Before I even installed it, the information from Microsoft was that you could FTP it to a remote site and it should work. The...
5
by: rote | last post by:
I'm using ASP.NET 2.0 and i have copied and pasted the code below to my Global.asax file but it desn't trap the error I want to trap the 401 access denied void Application_Error(object sender,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.