views:

10

answers:

1

I recently moved my blog from

http://blog.mydomain.com

to

http://mydomain.com

My problem now is that I have sites linking to the old addresses.

What can I put in my .htaccess file to make, for instance,

http://blog.mydomain.com/my-post-title-here

go to

http://mydomain.com/my-post-title-here

Thanks in advance!

A: 

Answered my own question. I put this in the root of the 'blog' subdomain:

rewriteEngine on
rewriteBase /
rewriteCond %{HTTP_HOST} ^blog.mydomain.com$
rewriteRule ^(.*) http://mydomain.com/$1 [L,R=301]
andrhamm