I have an rails app which redirects wrong urls to “/”.
I made 404.html file and it has the following code.
<script type="text/javascript">
<!--
window.location = "http://www.mydomain.com/"
//-->
</script>
It works well in Firefox but IE doesn’t redirect.
IE draws its own “The webpage cannot be found.” page.
I checked log file and it surely rendered 404.html.
This happens regardless of IE versions.
What’s wrong?
Sam
We all like IE’s “features”, don’t we?
If you create an error page that’s too small (in size) than Internet Explorer will display its own error page. This limit for 404 pages is 512 bytes…
You could add some padding to that HTML page or use headers for redirection (that is probably not what rails programmers would do it) or use a catch-all route.
For more info see:
A Warning about IE and too-short custom 404 error pages