Custom errordocs not working in IE10

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Custom errordocs not working in IE10

Post by simonmlewis »

I have created some custom error pages, that use the HTML META refresh, to take them to an internal PHP page.

In Firefox and Chrome, these are read perfectly and take the user to the right page.

In IE10 however, it just goes to a "The webpage cannot be found" page that I have not created.

Why??
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Custom errordocs not working in IE10

Post by Christopher »

Post your HTML code for the meta tag. Are you using full or relative URLs?
(#10850)
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Code: Select all

<meta http-equiv="Refresh" content="0 ;URL=http://www.domain.co.uk/oops">
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Custom errordocs not working in IE10

Post by Eric! »

That looks right. Try closing the tag and removing the space:

Code: Select all

<meta http-equiv="refresh" content="0;URL=http://www.domain.co.uk/oops" />
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Still goes to " The web page cannot be found." Why does it use one not on my server?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Custom errordocs not working in IE10

Post by requinix »

IE has an option where it will display its own error pages instead of showing what the server returned.

Internet Options > Advanced > Browsing section > Show friendly HTTP error messages
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Right, but how does that help me in providing them with a better user experience?
Mine is set to default, so are you saying all those users who have theirs on default, won't ever see the proper "sorry page not found, have you seen these products?".

I've just tested it and you are quite right - but I fail to see how that is a good thing to have that enabled by default, when developers are trying to give the user a good experience.

So instead of a nice page, they get the "ERROR!!!" page.

Is this basically it tho?? We are lumped with that? lol
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

I thought you could direct the 404 via HTACCESS but again, for me that wouldn't work.

Code: Select all

ErrorDocument 404 http://www.domain.co.uk/oops
Do you put this just after the Options in HTACCESS?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Custom errordocs not working in IE10

Post by requinix »

IE won't show its error page if you return something yourself. (Something substantive.)

Don't use a refresh. Actually output the error page right then and there. It's also much, much better for SEO.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Sorry - out put it where, in HTACCESS? How?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Custom errordocs not working in IE10

Post by Eric! »

He's saying to serve up an error page via PHP/html rather than serve up an HTML page that has a refresh meta tag. So if you want to use .htaccess to do this:

[text]ErrorDocument 404 /path/404page.html[/text]

Then the 404page.html can display whatever custom message you want.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

I need to point them to a PHP page on the main site.
So to do that, and my folder structure has errordocs and http in the same folder, do I do what I suggested a moment earlier?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Sorry - if I do that, and use /error_docs/not_found.html, and i visit a category page that doesn't exist, such as I am missing something in the URL to match up wtih HTACCESS, it just shows the category page with nothing on it.

But if I remove that code, in Firefox and others, it works and takes me to my "oops" page.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Custom errordocs not working in IE10

Post by Eric! »

What is a category page? Are these fetched by a url query or are they actual urls? Can you give an example of a working url vs one that should generate a "oops" error?
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Custom errordocs not working in IE10

Post by simonmlewis »

Ok.
So a url like /categ/66/red-shirt.
This is a correct URL.
If they enter /categ/66
This is invalid and should go to the error page - currently it does for all browsers bar IE.
The oops page is:
/oops

Or do you need the "full url" the shorturl rewrites?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply