私たちの解決策(ダリルの提案による-しかし、これはコメントするには情報が多すぎます)
URL 管理用の優れた低コスト ツールであるISAPI_Rewrite 3.0を使用しているため、このソリューションはその製品に合わせて調整されていますが、概念的には他の環境にも有効である必要があります。
DNS (mydomain.com 用)
A newsub newIP #(new record)
A existing newIP #(updated IP)
新しいホストのサイトの IIS 構成:
Add newsub as a hostheader on site
新しいホストのサイトの .htaccess
#add as first rule. trap requests for new subdomain and redirect to existing
#ASSUMES that redirect to existing is now safe because DNS for existing
#was updated when newsub DNS was queried.
#otherwise this is going to be an endless loop of
#redirects between the old and new server
RewriteCond %{HTTP_HOST} ^newsub\.
RewriteRule ^(.*)$ http://existing.mydomain.com/$1 [R=302, L]
古いホストのサイトの .htaccess
#add as first rule. redirect all requests to new subdomain
RewriteCond %{HTTP_HOST} ^existing\.
RewriteRule ^(.*)$ http://newsub.mydomain.com/$1 [R=302, L]