1

すべてのスクリプトを別のドメインに移動し、いくつかの基本 URL を新しい URL にリダイレクトしたいと考えています。しかし、ルートの古いドメインにある 1 つのスクリプトについては、古いドメインにリダイレクトして停止しipn.phpたいと考えています。index.php

すべての URL をリダイレクトしたいのですが、これは を介し​​て古いドメインで実行されましたindex.php

このようなもの:

Options +FollowSymlinks -Indexes
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^old_domain.com [NC]
RewriteRule ^(.*)$ http://www.old_domain.com/$1 [L,NC]

# One old script ipn.php to old index.php (it's connected with old PayPal subscriptions)
RewriteRule ^ipn\.php(.*)$                          index.php$1 [L]

# Other URLs on new domain scripts
RewriteRule ^index.php(.*)$                         http://www.new_domain.com/some_common_script.php$1 [R=301,L]
RewriteRule ^splash/1/(.*)$                         http://www.new_domain.com/splash1.php?param=$1 [R=301,L]
RewriteRule ^splash/2/(.*)$                         http://www.new_domain.com/splash2.php?param=$1 [R=301,L]
RewriteRule ^splash/3/(.*)$                         http://www.new_domain.com/splash3.php?param=$1 [R=301,L] 

#...

これどうやってするの?

4

0 に答える 0