Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Installing & running WordPress (http://forum.bytesforall.com/forumdisplay.php?f=6)
-   -   [SOLVED] Migrated blog from /blog to root folder and cannot redirect. Any help? (http://forum.bytesforall.com/showthread.php?t=13403)

Foodie With Family Mar 21, 2011 08:52 AM

[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

lmilesw Mar 21, 2011 09:36 AM

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
Again no guarantees but it's at least something to try.

Foodie With Family Mar 21, 2011 09:37 AM

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!

lmilesw Mar 21, 2011 10:04 AM

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
just before it to tell you what it's for in the future.

Foodie With Family Mar 21, 2011 05:42 PM

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? :):)

lmilesw Mar 21, 2011 07:03 PM

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>
RewriteEngine On
RewriteBase /
RewriteRule ^blog/(.*)$ /$1 [R=301,NC,L]
</IfModule>


Foodie With Family Mar 21, 2011 08:06 PM

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!

Foodie With Family Mar 21, 2011 08:13 PM

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, :):)

Foodie With Family Mar 21, 2011 08:32 PM

@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 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.