Redirect permanent /sample/aaa/ ~
は、「パスが/sample/aaa/
で始まるものをリダイレクト」です。
「パスが/sample/aaa/
と完全一致するものをリダイレクト」ではありません。
Apache
1Redirect permanent /sample/aaa/bbb/ ~~
2Redirect permanent /sample/aaa/ ~~
と前に書くことで/sample/aaa/bbb/
を別のURLにリダイレクトすることは可能ですが、
・/sample/aaa/bbb/
はリダイレクトしない
・/sample/aaa/bbb/index.html
等以外は~~という指定
などは不可です。
これでまかなえない要件はmod_rewrite
でリダイレクトします。今回は列挙ですね。
Apache
1RewriteEngine On
2RewriteRule ^sample/aaa/$ https://best-kobetsu.co.jp/sample/ [R=301]
3RewriteRule ^sample/aaa/index\.php$ https://best-kobetsu.co.jp/sample/index.php [R=301]
4RewriteRule ^sample/aaa/index\.html$ https://best-kobetsu.co.jp/sample/index.html [R=301]
同一ホストであれば、リダイレクト先のhttps://best-kobetsu.co.jp
は不要で、/sample/
からでOK。
・
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。