Error 404 page will not work – please help
-
Please can someone help me with the following?
I am trying to create an error 404 page, If I put the following code in my 404 template (404.php ) I get html code showing, when I type a wrong url
<?php get_header(); ?>
<div id=”content” class=”narrowcolumn”>
<h2 class=”center”>Error 404 – Not Found</h2>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>However when I add the following simple code instead to the 404 template I get a blank white page.
<html>
<body>
<h1>Not found – 404 error</h1>
</body>
</html>my .htaccess file is the following
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
File permissions are set to 644
and my permalinks is set to custom /%postname%Please does anyone know why my error 404 page will not work?
Many Thanks
The topic ‘Error 404 page will not work – please help’ is closed to new replies.