.htaccessの設定にて、ファイルがない場合は別のホストの同名パスにリダイレクトする
http://7-2.jp/sample-sample.html
http://7-2.jp/sample-sample/sample-sample.html
http://7-2.jp/sample-sample/js/sample-sample.js
がない場合は、下記にそれぞれリダイレクトされる。
http://sample-url.net/sample-sample.html
http://sample-url.net/sample-sample/sample-sample.html
http://sample-url.net/sample-sample/js/sample-sample.js
ファイルが存在する場合は、リダイレクトされない
http://7-2.jp/try/index.html
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ http://sample-url.net/$1 [L]