this will work reliably. I would suggest that directing people to a non-homepage though. Why? get some better / higher converting content to rank / get traffic ;-)
enclave, thanks! Are you saying that should be the content of the 404.php error page? Problem is, I've since found, that it's not accessing this page at all. I don't know why. I THOUGHT wordpress used that file if it existed automatically. That does not seem to be the case. I don't want to "succumb" to the plug-in solution until I understand this fully. So, were you talking about the 404.php file having that content? Also, is it or should it be necessary that I reference that file in .htaccess? (I THOUGHT WP handled this "automagically". : ) Or, if not, then it's based on how the theme is configured by the theme writer? (and if so WHERE/how?). Now, regarding your comment about getting better/higher content ranking by not going directly to the front page... really? how so? I don't understand why/how that would work? Please explain. My content is "time sensitive" so the freshest content (and it's updated nearly every day) ... ads appear on every page... so my setup is probably not your typical one. Thanks again for your response, enclave... Anyone is invited to add their two-bucks here (formerly "two-cents" but you know, the economy and all...
Edit your 404.php with and put the following code <?php wp_redirect(get_option('siteurl'),301); ?> PHP:
Thanks WiroWaas... did that. It didn't work... again... for some reason I'm not hitting that file... I can prove that because I put google.com in as the site url and it didn't go there. I appreciate you trying to help though. It may be a config problem with wordpress/plesk... What I need to know is if wordpress automaticaly uses a 404.php file if it encounters it within the same directory as the theme's php pages, or if you have to HOOK it somehow when you create a theme. I'm using a theme called "unknown" (yeah, try searching for that!!!) and I don't know if it came originally with a 404.php page or not. but if I can determine how wordpress deals with this. or how a theme builder should deal with it, then I'd understand a little bit more. Thanks again, for your help. Pi
<?php header("Status: 301 Moved Permanently"); header("Location:http://url"); ?> this worked for me. try it
1st sorry to bring this old post back. But after a lots of search I found it and it solved my problem. After migrating from blogger to wordpress, I have many hundreds 404 error and it just solved all it easily. thanks you