.htaccess - Redirection of subdirectory to totally new domain -


i've got site merge that's little confusing.

the old site lived at: oldsite.com/subdirectory

the new site lives at: newsite.com/

i'm unsure put .htaccess 301 redirects. put them in sub-directory of oldsite.com/subdirectory? or add them root .htaccess oldsite.com/

i think make happen in oldsite.com .htaccess file:

redirectmatch 301 ^/subdirectory/(.+)$ http://www.newsite.com/$1 

i tried above , it's not working. help!

(both sites hosted dreamhost, if matters @ all.)

thanks!

figured out.

at first kept subdirectory , placed .htaccess file inside saying:

rewriteengine on rewriterule ^(.*)$ http://newsite.com/$1 [r=301,l] 

but found out in forum this:

redirectmatch 301 /subdirectory(.*) http://newsite.com$1 

hope helps else!


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -