Apache、http.conf内でのmod_rewriteの書き方をご教授ください。
希望
https://www.example.co.jp/sample/
へアクセスが来たら、
https://www.example.co.jp/section/test.php
へ飛ばしたいと考えております。
※301リダイレクト
下記を設定したのですが、動作せず。。。
ご指摘頂きたいです。
lang
1<IfModule mod_rewrite.c> 2 RewriteEngine 3 RewriteLog "logs/rewrite_log" 4 RewriteLogLevel 0 5 6 RewriteCond %{REQUEST_URI} ^sample/$ [NC] 7 RewriteRule ^sample/(.*)$ https://www.example.co.jp/section/test.php [L,R=301] 8 9 RewriteCond %{SERVER_PORT} !^443$ [NC] 10 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] 11 12</IfModule>
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー