Migrating domains - 301 Redirect of all contents of directory

Posted by Trufa on Server Fault See other posts from Server Fault or by Trufa
Published on 2011-01-11T18:37:57Z Indexed on 2011/01/11 18:55 UTC
Read the original article Hit count: 233

I need to do a 301 redirect with apache since I'm migrating domains.

What I would need to do is the following, from certain directories, redirect all of it's content to a different damin (where the file already exists).

Let's say I have one.com/files/something.doc or one.com/files/other.php

I have already "copied" or "backed up" all the contents of the directory, so the following already exist:

two.com/old/files/something.doc and two.com/old/files/other.php

So I would just need to redirect anything in the directory "files" (or whatever).

I hope the question is clear enough, if not please ask for any clarification needed!!

Thanks in advance!!

© Server Fault or respective owner

Related posts about mod-rewrite

Related posts about .htaccess