Custom errordocs not working in IE10
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
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??
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.
All the best from the United Kingdom.
- 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 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
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.
All the best from the United Kingdom.
Re: Custom errordocs not working in IE10
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
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.
All the best from the United Kingdom.
Re: Custom errordocs not working in IE10
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
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
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
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.
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
I thought you could direct the 404 via HTACCESS but again, for me that wouldn't work.
Do you put this just after the Options in HTACCESS?
Code: Select all
ErrorDocument 404 http://www.domain.co.uk/oopsLove PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Custom errordocs not working in IE10
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.
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
Sorry - out put it where, in HTACCESS? How?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Custom errordocs not working in IE10
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.
[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
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?
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.
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
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.
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.
All the best from the United Kingdom.
Re: Custom errordocs not working in IE10
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
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?
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.
All the best from the United Kingdom.