TCH-Tim Posted March 7, 2006 Posted March 7, 2006 I recently dropped my entire Wordpress blog (876 posts) in lieu of a smaller, easier to maintain website. In just the one day since I dropped the database and deleted the WP install directory, I have seen the number of 404 errors go up significantly. I would like to set up a redirect such that if someone is looking for anything in the /wp directory (ie. /wp/somecategory or /wp/somecategory/somepostid and so on) they just get sent back to the new front page /index.php. There is no /wp directory anymore, there is no Wordpress install anymore, so the "post not found" WP error page is no longer there. Instead it's all ugly 404's. I'm not concerned about lost search engine traffic due to content not being where Google and Yahoo think it is, but if somebody comes to my site I'd at least like them to see a real page. Quote
TCH-Rob Posted March 7, 2006 Posted March 7, 2006 Set up a redirect in cPanel of htaccess that sends anyone to /wp to your index. You are a smart cookie but if you need help let us know. Quote
wampthing Posted March 7, 2006 Posted March 7, 2006 For those of us that arent smart cookies... I would love to hear the solution. I had assumed that it could be easily done by doing something like the following in the htaccess file. redirect 301 /wp/ http://www.mysite.com/catchall.html Just for kicks and giggles I had tried to do it myself, but it only worked if I typed in www.mysite.com/wp/ Am I not on the right track? Quote
click Posted March 7, 2006 Posted March 7, 2006 (edited) I believe "RedirectMatch 301 ^/wp/.*$ http://www.mysite.com/catchall.html" should do it. Edited March 7, 2006 by click Quote
TCH-Rob Posted March 7, 2006 Posted March 7, 2006 Dave, You assume I "AM" a smart enough cookie to know that answer? Quote
wampthing Posted March 7, 2006 Posted March 7, 2006 Dave, You assume I "AM" a smart enough cookie to know that answer? Rob, With 8188 post, There is no doubt in my mind. Click, Thank you. I am a smarter man having met you. Quote
TCH-Bruce Posted March 7, 2006 Posted March 7, 2006 Rob,With 8188 post, There is no doubt in my mind. Post counts mean nothing except that we talk alot. Quote
TCH-Thomas Posted March 7, 2006 Posted March 7, 2006 Dave, Take away google from Rob and we are all equal. Quote
TCH-Tim Posted March 8, 2006 Author Posted March 8, 2006 I believe "RedirectMatch 301 ^/wp/.*$ http://www.mysite.com/catchall.html" should do it. Works like a peach. Thanks. I'll get a handle on this .htaccess stuff yet. Does anybody know of a good comprehensive listing of what all that junk is? Quote
stevevan Posted March 8, 2006 Posted March 8, 2006 I'm sure you (or Rob) could Google something up! If you find something, drop a link or two so that anyone else who is interested can research this too. Quote
TCH-Tim Posted March 8, 2006 Author Posted March 8, 2006 (edited) But Rob doesn't use Google. Figured he would just know the answer. Edited March 8, 2006 by timhodge Quote
click Posted March 8, 2006 Posted March 8, 2006 There's a handy mod_rewrite cheat sheet (and a bunch of other good info) here. Quote
TCH-Rob Posted March 8, 2006 Posted March 8, 2006 I dont use Google because I AM Google! I find that I use http://www.javascriptkit.com/howto/htaccess.shtml alot when I need to learn something new about htaccess. Steve is right though in a way. There are many resources geared towards teaching htaccess rules out there. Quote
TCH-Rob Posted March 8, 2006 Posted March 8, 2006 Maybe I should change my name to Google. Think their lawyers would allow it? Quote
TCH-Thomas Posted March 9, 2006 Posted March 9, 2006 Not if you just change to Google, but Google-Rob would be ok I guess, according to http://www.google-kai.com/ About the above link, I have read about this boy before in another place, but I just visited his site for the first time and it looked messed up in Firefox so if you go visit that site, use another browser or it´s text will make no sense. Quote
TCH-Tim Posted March 9, 2006 Author Posted March 9, 2006 http://www.google-kai.com/ People are strange. Quote
TCH-Rob Posted March 9, 2006 Posted March 9, 2006 And all over the world at that. Seems we Yanks don't have a choke hold on that department. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.