Classipress Error 404 management

Classipress is a great wordpress theme-classifieds ads platform. With it, you have to option to set a schedule when a particular ad will expire and subsequently deleted. It is a really great feature but it will also result to several error 404 pages when a particular page or posting is already indexed by the search engine.

classipress_error_404

There are several wordpress plugins to manage error for redirection but I find the easy way to do it is to change the Classipress default 404. Simply replace the Classipress 404.php code with the code below;

<?php
header(“Status: 301 Moved Permanently”);
header(“Location:http://www.yoursite.com”);
?>

Yes, it’s a simple code and there you go. Every time a deleted post will come out in the search engine result and visitors click on it, they will be redirected to the homepage.

This entry was posted in Plugins and Mods and tagged . Bookmark the permalink.

2 Responses to Classipress Error 404 management

  1. it didnt work for me
    it says …

    syntax error unexpected on line 2

  2. Rick Duncan says:

    This works like a dream … note you need to change the quotation marks (“) in the code above to be proper quotation marks (“) or it won’t work as with the comment above :o )

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>