Wordpress 404 problem

Codythebest

Senior Member
Joined
May 29, 2009
Messages
1,136
Reaction score
907
I have a blog indexed in G.
But all the page named : mysite.com/blog/search/article-title/ return a 404.

mysite.com/blog/article-title/ is working OK. I don't have any search file though. Maybe that's the problem.

Anyone knows how to fix this?
 
You could put a 404.php in your theme directory and put the following in:

PHP:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>

Then everytime you get a 404 it will be redirected to your homepage.
 
It works.
But each indexed pages are now redirected to the blog homepage instead of their own article page
 
Maybe deactivating plugins can work for you too, see this:

Code:
wordpress  **  org/support/topic/searching-returns-404

Change "**" to ".", an not allowed to post links yet.

Tell me if it worked ;)
 
Maybe deactivating plugins can work for you too, see this:

Code:
wordpress  **  org/support/topic/searching-returns-404
Change "**" to ".", an not allowed to post links yet.

Tell me if it worked ;)

Unfortunately, it didn't work. I played with the plugins and still have that problem
 
Hello cody.. Nice to find you here on BHW.. I guess you were a very active member at DP few years back.

Now for you problem:
1) Check if mod rewrite is enabled. Make sure you have a htaccess file. Create a blank one if needed and then just go to permalink structure setting and click save button.

2) If that does not solve problem, try using this plugin
http://wordpress.org/extend/plugins/smart-404/

It redirects the 404 error page to most appropriate page on your site.
 
Back
Top