0

I've got a site merge that's a little confusing.

The old site lived at: oldsite.com/Subdirectory

The new site lives at: newsite.com/

I'm unsure as where to put my .htaccess 301 redirects. Do I put them in the sub-directory of oldsite.com/Subdirectory? Or do I just add them to the root .htaccess for oldsite.com/

I think that I could just make this happen in the oldsite.com .htaccess file:

RedirectMatch 301 ^/Subdirectory/(.+)$ http://www.newsite.com/$1

I tried that above and it's not working. Thanks for the help!

(Both sites are hosted by Dreamhost, if that matters at all.)

Thanks!

4

1 回答 1

0

弄清楚了。

起初我保留了子目录并在其中放置了一个 .htaccess 文件说:

RewriteEngine On
RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]

但是后来在论坛中发现我可以这样做:

RedirectMatch 301 /Subdirectory(.*) http://newsite.com$1

希望对其他人有帮助!

于 2013-04-20T02:12:45.713 回答