0

Drupalマルチサイトを実行しています。メインサイトでは、約600ページをリダイレクトする必要があります。使ってます:

RedirectMatch 301 ^/tags/manchester_conference$ http://mainsite.com/tags/health-and-safety-events/manchester_conference 

/ tags / manchester_conferenceというページもある場合、これらはマルチサイトにも影響を及ぼします

これをメインサイトでのみ機能させるにはどうすればよいですか?

4

1 に答える 1

1

解決策は、ルートディレクトリにある1つの.htaccessファイルでmod_rewriteを使用して、メインサイトにのみルールが適用されるようにすることだと思います。

このようなものが機能するはずです:

Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}   ^(www\.)?mainsite\.com    [NC]
RewriteCond %{REQUEST_URI} !/health-and-safety-events/manchester_conference  [NC]
RewriteRule ^tags/manchester_conference  /tags/health-and-safety-events/manchester_conference  [R=301,L,NC]
于 2013-03-27T07:25:45.717 に答える