example.com から jp.example.com に、フォルダー"home/"および"car/"で始まるすべての URL のみをリダイレクトする方法が必要です。
たとえば、次のようになります。
example.com/home/test.html ---> jp.example.com/home/test.html
example.com/car/test.html ---> jp.example.com/car/test.html
jp.example.com/home/second-test.html ---> jp.example.com/home/second-test.html
jp.example.com/third-test.html ---> example.com/third-test.html
私はこのコードを使用しています:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^jp.example.com$
RewriteRule ^(.*)$ http://jp.example.com/$1 [R=301]
しかし、example.com から jp.example.com にすべての URL を書き換えるので、機能しません。