404 is blank when unknown file types are requested.
February 13, 2012 9:57 AM   Subscribe

404 page only fires for a few specific file types, or for 'directories', but not for unknown file types (or perceived perceived file types). PHP, Joomla, IIS.

A legacy asp site is being replaced with a Joomla installation (1.7). I have ginned up a little JavaScript embedded in our error.php, which sniffs the URL being requested, matches it to the top 50 pages on the old site and offers to redirect to the corresponding Joomla page. This works great when the page in question is a directory, php, htm or html file (http://example.com/staff, http://example.com/staff.php, http://myurl.com/staff.html, http://example.com/staff.php) but the 404 page does not kick off when the page in question is an asp page (http://example.com/staff.asp), or indeed any page that could be construed as being some other file extension (http://example.com/staff.booger).

To be clear, it isn't that our script doesn't work when it gets fed an .asp url - the 404 page never shows up at all - just a blank page. Everything works fine on my local instance of IIS.

It seems likely to me that there is an inclusive list of file-types somewhere that is being used, and that sucks. Where is it? How can I make it suck less?

I am a front end guy, but the back end guys will do what I need them to do if I am able to tell them what I need them to do. This is a fairly large organization, with fairly byzantine reasons for everything, but suffice to say: this needs to be done with a client side script and not a Joomla extension, the server platform is IIS, the Joomla version is 1.7.
posted by anonymous to Computers & Internet (2 answers total)
Can you determine, in the two cases (working v. non-working) if the error handling you are seeing is at the Joomla layer or the IIS layer?
posted by artlung at 10:18 AM on February 13, 2012

Even if the server is showing a blank page, you should be getting some sort of response code (in the server logs or using a client side tool like chrome to see live http headers or firefox plugin). My wild guess would be a problem in that error.php maybe just a simple parse error thats related to the javascript you've added. If the php error display or reporting is turned off you will just get a blank page instead of getting useful info.
posted by yeahyeahyeahwhoo at 12:19 PM on February 13, 2012

« Older OWWWWWWWW owowowowowowow waaaaahhhhh make it stop!...   |   Sorry, you aren't profitable enough to live. Newer »
This thread is closed to new comments.