[SOLVED] Migrated blog from /blog to root folder and cannot redirect. Any help?
I migrated my blog from the /blog location to the root folder this weekend. Sadly, all my attempts to redirect so that my SEO rankings and links are preserved seem to be going south. I added the following bit of code in the .htaccess folder:
RewriteEngine On RewriteBase / rewriterule ^blog(/.*)? $1 [L,R=301] Let's just say it didn't do re-directs the way I wanted them. It just redirected every internal link in the website (say on post titles or comment links, etc...) go back to the home page in the root folder. All my old /blog links (with the exception of images) just led back to the home page in the root folder as well. ACK! Does anyone have any idea what I've done wrong? My url: http://foodiewithfamily.com |
I am by no means a redirect master and have seen how confusing it can be. Here is one POSSIBLE solution. Replace what you have in your htaccess file with the following.
HTML Code:
Redirect 301 /blog http://foodiewithfamily.com |
Hi Larry! Should that go before or after the #BEGIN Wordpress? I feel like my eyeballs are rattling around in my skull thinking about this so much! Thanks for being willing!
|
That's just a comment line so I don't think it matters. I would put it at the very top just to separate it from the rest and you could put
HTML Code:
# Redirect from blog folder |
Thank you both, lmilesw and stw. I tried both, but neither solution worked. And hostmonster does have mod_rewrite installed, but for some reason...
Hmm... I wonder if I boogered something else up in the migration. I copied my /blog files to the root folder but nothing doing on the redirects. Very frustrating. I am, admittedly, a novice at this, but I'd like to salvage what I can. And folks? I can't offer much, but I make mean baked goods and canned things (my candied jalapenos are semi-famous, one bit of SEO I'd love to preserve. Pun intended.) I'd be happy to send some goodies to someone who can help me solve it! And geez, do I sound like my grandma now or what? :):) |
You caught my attention with the candied jalepenos. Try the following which is almost the same as was mentioned. Just a missing caret (^) before blog.
HTML Code:
<IfModule mod_rewrite.c> |
Before or after the #BEFORE, Larry? I'm trying both, but hey... I'm seriously desperate at this point.
Like candied jalapenos, eh? I have that and all sorts of good home preserved goodies! |
OHMYGOSH. Did that seriously just work, Larry???? It looks like it did, so far! Can I pretty please send you some goodies (candied jalapenos) as a thank you? You're the bestest ever! I'm on twitter, :):)
|
@foodiewithfam or you can direct email me with your mailing addy! I want to send you a thank you!
|
All times are GMT -6. The time now is 04:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.