Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134520

alexbowyer on "How to set .htaccess correctly for 301 redirects to subdirectory."

$
0
0

Hi, I have an unusual Wordpress migration / htaccess redirect situation I need some help with.

I had an existing personal blog at the root of alexbowyer.com.
I want to set up a new wordpress site for my business at the root of alexbowyer.com, and migrate the existing personal blog from alexbowyer.com to blog.alexbowyer.com.

I have successfully migrated the blog to blog.alexbowyer.com, but now I am trying to set up the 301 redirects correctly, so that I don't lose SEO juice/google links etc to my old personal blog.

I can't redirect all alexbowyer.com traffic because I want to set up a new WP site at that address. So I have added specific .htaccess redirects at the root of alexbowyer.com for every post like this:

Redirect 301 /2013/07/fantasia-festival-2013-mini-reviews/ http://blog.alexbowyer.com/2013/07/fantasia-festival-2013-mini-reviews/

The problem I have is that I am getting "Too many redirects" when trying to view posts in the 'blog' subdirectory - presumably because the htaccess file from the parent/root directory is being picked up, creating a never ending loop.

I need some way to make the redirect only have effect on requests made to alexbowyer.com ROOT but not requests made to blog.alexbowyer.com.

I hope someone can help?


Viewing all articles
Browse latest Browse all 134520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>