Jump to content


Photo
- - - - -

404 page and IE


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 markn

markn

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 22 March 2010 - 07:29 PM

Internet Explorer is intercepting the custom 404 page that comes with the Whitehouse theme and is instead displaying the IE error page. I've added an 'ErrorDocument 404 /wp-content/themes/whitehouse/404.php' directive to the .htaccess file in the sites web root but that doesn't seem to be helping. How do I get the themed 404 page to display in all browsers?

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 23 March 2010 - 05:59 AM

depends on file structure. In most situations I've seen; IE will display the correct page. more details would be needed about your htaccess and file structure to figure this one out...

#3 markn

markn

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 23 March 2010 - 03:23 PM

Here's my htaccess file: # Start with some permanent redirects RewriteEngine On Redirect 301 /piano_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /early_childhood_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /violin_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /voice_teachers.html http://manhattanarea...rs.org/teachers # Force IE to use our 404 page #ErrorDocument 404 /404.php ErrorDocument 200 /wp-content/themes/whitehouse/404.php #ErrorDocument 404 /index.php?error=404 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress By changing the ErrorDocument to 200 from 404 I was able to force the error page to properly display in IE. With the declaration set to 404, IE intercepts the 404.php and displays its less than useful MSN page.

#4 markn

markn

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 23 March 2010 - 08:06 PM

The path to the theme provided 404 page is wp-content/themes/whitehouse/404.php, so my htaccess file looks like this: # Start with some permanent redirects RewriteEngine On Redirect 301 /piano_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /early_childhood_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /violin_teachers.html http://manhattanarea...rs.org/teachers Redirect 301 /voice_teachers.html http://manhattanarea...rs.org/teachers # Force IE to use our 404 page #ErrorDocument 404 /404.php ErrorDocument 200 /wp-content/themes/whitehouse/404.php #ErrorDocument 404 /index.php?error=404 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress I can get the 404 page to appear in IE by setting the ErrorDocument declaration to 200 instead of 404.