1

我想将我的所有脚本移动到另一个域并将一些基本 URL 重定向到新的 URL。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