• I’m in the process of consolidating several WordPress installations into one website. Why the last admin at my job created a new installation for every project is beyond me, but those are my parameters.

    The last site was all static HTML pages but had a WP blog in a folder called “blog,” located at https://blog.oursite.com. I’ve since replaced the static pages with a new WP installation, which has a url called https://oursite.com/blog. These two blogs hate each other.

    The old blog interfered with the new blog, so I renamed the old folder to avoid confusion. I’m not interested in preserving the old blog, so I was happy to just get the new one working. But I’d like to redirect the old page. How do I redirect https://blog.oursite.com to https://oursite.com/blog without interfering with my current blog? I’m familiar with .htaccess redirects, but I can’t seem to make it work without at least one of those pages getting a hosting error.

Viewing 1 replies (of 1 total)
  • There are essentially two ways to do this:

    1. .htaccess rule in the WordPress installation, or
    2. .htaccess rule in subdomain’s document root

    You can add the following line to your .htaccess file which should redirect all requests to blog.oursite.com to oursite.com/blog (put it after ReWriteEngine On):

    RewriteCond %{HTTP_HOST} ^blog\.mysite\.com
    RewriteRule ^(.*)$ /blog [L]

    Or, you can give the subdomain blog.oursite.com its own document root on your server and then put a .htaccess file in it to redirect all traffic. (Same rule as above)

Viewing 1 replies (of 1 total)
  • The topic ‘Redirect challenge: two blogs called "blog"’ is closed to new replies.