Title: 404 redirection
Last modified: August 18, 2016

---

# 404 redirection

 *  [shadow](https://wordpress.org/support/users/shadow/)
 * (@shadow)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/)
 * Hi,
    I am trying to sort out my 404 stuff.
 * I would like to make it so that visitors who end up at a 404 are redirected to
   a message contained within the site itself.
 * For instance, going to [http://shadows.os42.com/2005/03/25/its-not-going-to-be-easy-people/](http://shadows.os42.com/2005/03/25/its-not-going-to-be-easy-people/)
   
   no longer works.
 * So how do I redirect the visitor using my 404.php and 404.shtml to a page which
   has the header, sidebar and footer and a message telling them to go elsewhere?
 * It is half happening here
    [http://shadows.os42.com/404.php](http://shadows.os42.com/404.php)
 * but obviously it is not right yet…
 * Thanks for any advice you can offer 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179658)
 * [http://wordpress.org/support/topic.php?id=24061#post-159891](http://wordpress.org/support/topic.php?id=24061#post-159891)
 *  Thread Starter [shadow](https://wordpress.org/support/users/shadow/)
 * (@shadow)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179661)
 * Thanks for the link kafkaesqui but the main reason I am having to do this is 
   because I am having trouble writing to my .htaccess.
 * Is there another way of doing this not using .htaccess ?
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179662)
 * If you have access to your server’s .conf file…
 * Seriously, one way you may be able to this (and still point to the proper theme)
   is to treat the 404.php in your root as a non-themed but still WP template file
   by adding this at the top:
 * `<?php
    define('WP_USE_THEMES', false); require(./wp/wp-blog-header.php'); ?>
 * Then to call the various template includes (header, footer, etc) for the active
   theme, use this format:
 * `<?php load_template( TEMPLATEPATH . '/header.php'); ?>`
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179665)
 * Actually, not thinking deep enough tonight. `get_header()`, `get_footer()` and
   so on will continue to work. So no need for the slightly longer version above.
 *  Thread Starter [shadow](https://wordpress.org/support/users/shadow/)
 * (@shadow)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179672)
 * Thanks Kafkaesqui 🙂
 * I think I may have found an easier solution though.
 * Any error pages are directed to my 404.shtml so I have added a quick redirect
   script there and linked that to a simple error announcement on a static page.
 * It seems to work.
 * Have a look…
 * [http://shadows.os42.com/this-page-will-not-work](http://shadows.os42.com/this-page-will-not-work)
 * Thanks again for your help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘404 redirection’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [shadow](https://wordpress.org/support/users/shadow/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/404-redirection/#post-179672)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
