質問編集履歴
1
「samlple」と間違えて記述していたため、「example」に訂正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
https://htaccess.madewithlove.com/ 左記サイトでリダイレクトテストしていますが、
|
3
3
|
最後行のみうまくいきません。
|
4
4
|
|
5
|
-
http://
|
5
|
+
http://example.co.jp/company.phpからの設定となり、移行先は、https://wwwexample.co.jp/company/(index.html)です。
|
6
6
|
現状company.phpを対象としていますが、同じようにほかのページもディレクトリを追加し、index.htmlにするため、同様に追記すればよいのかも疑問です。
|
7
7
|
|
8
8
|
RewriteEngine on
|
9
9
|
|
10
|
-
RewriteCond %{HTTP_HOST} ^
|
10
|
+
RewriteCond %{HTTP_HOST} ^example\.co\.jp$
|
11
|
-
RewriteRule ^(.*)$ https://www.
|
11
|
+
RewriteRule ^(.*)$ https://www.example.co.jp/$1 [R=301,L]
|
12
12
|
RewriteRule ^company.php$ company/ [R=301,L]
|
13
13
|
|
14
14
|
お手数おかけしますが、よろしくお願いいたします。
|