Jump to content
Sign in to follow this  
martyn

Enabling 404

Recommended Posts

martyn    0
martyn

Hi. I have customised my 404 page but it does not seem to appear. Do I need to enable the custom 404 somewhere? It's not clear to me how I get this feature working. Thanks. Martyn

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

There are 2 options to consider: 1. You can add this to your .htaccess file (which is located in the root folder along side all your other WordPress files):

ErrorDocument 404 /sitemap/

changing /sitemap/ to whichever path you wish. 2. You can use the plugin "Redirection" (Just search for it from your Plugins > Add New page) to redirect 404 pages to anything you want. Thanks, Bryan

Share this post


Link to post
Share on other sites
martynglanvillegmailcom    0
martynglanvillegmailcom

Thanks Bryan. 1. I do not have a .htaccess file anywhere in my setup. Have searched and there is nothing. 2. I installed the Redirection plugin but, frankly, could not make any sense of how it works. (It asked for the URL that needs to redirect to the 404?) I find this disappointing and frustrating, as you can imagine. I will have to accept for now that my EcoPro site is going to fail users who encounter a 404. I really wish this could be enabled in a much simpler way. Martyn

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

Okay, here's an absolute sure way to get exactly what you want; from your WordPress admin, navigate to: Appearance > Editor > 404 Template (404.php) and at the very top, add this line of code:

<?php header('location: /'); ?>

change / to the exact, full URL of whatever you want. Thanks, Bryan

Share this post


Link to post
Share on other sites
martyn    0
martyn

Hi Bryan. I appreciate your efforts to fix this. Still not working, alas. This is the code in my 404.php template: <?php header('location: http://www.prosocialgroup.com/?page_id=1107''>http://www.prosocialgroup.com/?page_id=1107'); ?> <?php /* This theme is Copyright © 2008-2009 Andrew Powers, PageLines.com (andrew AT pagelines DOT com) */ global $pagelines; get_header(); require(THEME_LIB.'/_spotlight.php'); include (THEME_LIB . '/template_posts.php'); get_footer(); ?> This is the page I want people to see when they encounter a dead / wrong link: http://www.prosocialgroup.com/?page_id=1107 This is what they actually see: http://www.prosocialgroup.com/missingpage with missingpage being a substitute for anything that may refer to a page that does not exist

Share this post


Link to post
Share on other sites
paymentsnetdirectukcom    0
paymentsnetdirectukcom

Hello, You need to go back to Bryan's first suggestion and implement the .htaccess option - I think. If you don't already have a .htaccess file, you can just create one very easily and upload it. ( a quick Google search on .htaccess files will get you started). When looking/checking for your existing .htaccess, remember that it will probably only be located on the server side, with your web host, don't go looking for it in the local copy of your website files on your computer. Simon

Share this post


Link to post
Share on other sites
martyn    0
martyn

Thanks all. The .htaccess solution worked in the end - it needed some configuration by my ISP to implement.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×