Page 1 of 4

Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 7:47 am
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??

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:16 pm
by Christopher
Post your HTML code for the meta tag. Are you using full or relative URLs?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:22 pm
by simonmlewis

Code: Select all

<meta http-equiv="Refresh" content="0 ;URL=http://www.domain.co.uk/oops">

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:40 pm
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" />

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:46 pm
by simonmlewis
Still goes to " The web page cannot be found." Why does it use one not on my server?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:49 pm
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

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:51 pm
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

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:53 pm
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?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 12:59 pm
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.

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 1:02 pm
by simonmlewis
Sorry - out put it where, in HTACCESS? How?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 1:24 pm
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.

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 1:35 pm
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?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 1:48 pm
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.

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 3:10 pm
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?

Re: Custom errordocs not working in IE10

Posted: Tue Nov 26, 2013 3:14 pm
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?