This stuff is driving me nuts. The following url does NOT exist and should return a 404: http://www.easyjob.net/resume/

However, if I try to access it, I get a 301 to http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/

Even if I add a redirect to the .htaccess to redirect it somewhere else, I still get the * 301 to http://www.easyjob.net/r/cover-letter/resume-and-cover-letter/ again.

Anybody knows what's going on?

PS this is the .htaccess:

AddHandler php5-script .php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Redirect        http://www.easyjob.net/resume/ http://www.easyjob.net/r/ [R=301,NC,L]

4 Answers 4


If you remove your Redirect from the .htaccess file, you could try adding a custom 404.php template file to your theme. I'm not sure exactly what you are asking. Do you want the page to Redirect, or do you want a custom 404 page that displays similar items?

To achieve the show similar posts using the 404.php template try this:

Create a php file named 404.php Add this to the file and save it, then upload it to your theme directory:

<?php get_header(); ?>
        <div class="container">
<div class="content">
<h2 class="entry-title">Didn't Find What You were Looking For?</h2>
<p>Perhaps one of the links below, can help.</p>
$rel_tags = get_the_tags();
foreach($rel_tags as $rel_tag)
    $rel_tagnames .= $rel_tag->name . ',';
$rel_posts = get_posts('tag=' . $rel_tagnames . '&post__not_in' . $post->ID . '&showposts=5');
if (count($rel_posts)) : ?>
    <?php foreach((array) $rel_posts as $rel_post) { ?>
        <li><a href="<?php echo $rel_post->post_name ?>"><?php echo $rel_post->post_title ?></a></li>  
    <?php } ?>
<style type="text/css">
#return-home {
<div id="return-home">
<a href="<?php bloginfo('url'); ?>" title=" <?php bloginfo('name'); ?>">Click to Go to the Home Page:&nbsp;<?php bloginfo('name'); ?></a>
<?php else : ?>

<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

NOTE: You will need to replace the div's I've used with the ones your theme has or it won't look like the rest of your website. Open your index.php file and replace the <div class="container"> and <div class="content">from my file with your theme's div's.

  • I had noticed that Wordpress itself was making redirects for certain urls (that didn't exist and should therefore cause a 404). Apparently it's a new feature: mydigitallife.info/… I had no idea who was creating those redirects, that's what puzzled me.
    – cfischer
    Commented Aug 3, 2011 at 14:31

I agree with @Matthew Xerri's answer and a better solution might be to only remove the canonical redirect filter when the page that will be shown is a 404 page.

This post explains how this can be done: http://scottnelle.com/642/prevent-wordpress-guessing-users-hit-404-error/

function stop_404_guessing( $url ) {
    return ( is_404() ) ? false : $url;
add_filter( 'redirect_canonical', 'stop_404_guessing' );

Essentially, it will only remove the filter if the page that should be shown is a 404 page.

Alternatively you could write it a bit differently by taking bits from this issue: https://wordpress.stackexchange.com/a/227043

function stop_404_guessing() {
    if (is_404()) {
        remove_action( 'template_redirect', 'redirect_canonical' );

add_action( 'wp', 'stop_404_guessing' );



will create more problems than solve because that will enable other sorts of urls. http://www.easyjob.net/ and http://www.easyjob.net/index.php will be accessible and that is very bad for SEO since you have to pages showing the same content. I am looking for a solution to stop Wordpress from redirecting misspelled URLs and will update you I find one


The answer is probably kind of late, but if anyone come accross the same problem then you should try the following plugin: WP 404 auto redirect to similar post.

Long story short, the plugin use the template_redirect filter and check if a 404 is about to be displayed. If so, it will explode the URL and look for a similar post / taxonomy / post type.

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.