質問編集履歴
2
具体的に希望する実装結果のURLを記載しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,6 +15,13 @@
|
|
15
15
|
. ┣xxxx.html
|
16
16
|
|
17
17
|
|
18
|
+
**【11/6 10:53追記↓】**
|
19
|
+
|
20
|
+
http://www.test.com/A/index.html もしくは
|
21
|
+
http://www.test.com/A/piyo.html にアクセスした際、
|
22
|
+
http://www.test.com/A/AA/index.html にリダイレクトする
|
23
|
+
|
24
|
+
|
18
25
|
###自分で実装した結果
|
19
26
|
|
20
27
|
ディレクトリA内に以下の記述をした.htaccessを設置
|
1
hoge.html⇀index.htmlに変更しました。申し訳ございません。
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
ディレクトリAの中のディレクトリAAの④(index.html)にリダイレクト
|
8
8
|
|
9
9
|
[ディレクトリA]
|
10
|
-
. ┣
|
10
|
+
. ┣index.html…① **【11/6 10:27修正】**
|
11
11
|
. ┣piyo.html…②
|
12
12
|
. ┣.htaccess
|
13
13
|
. ┗[ディレクトリAA]
|
@@ -20,7 +20,7 @@
|
|
20
20
|
ディレクトリA内に以下の記述をした.htaccessを設置
|
21
21
|
```
|
22
22
|
RewriteEngine on
|
23
|
-
RewriteCond %{THE_REQUEST} ^.*/
|
23
|
+
RewriteCond %{THE_REQUEST} ^.*/index.html **【11/6 10:27修正】**
|
24
24
|
RewriteRule ^(.*)index.html$ http://www.test.jp/A/AA/index.html$1 [L,R=301]
|
25
25
|
|
26
26
|
RewriteEngine on
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
```
|
31
31
|
|
32
|
-
上記の記述だと、
|
32
|
+
上記の記述だと、index.html **【11/6 10:27修正】**はAA/index.htmlに飛ばされるのですが
|
33
33
|
piyo.htmlは飛ばされませんでした。
|
34
34
|
|
35
35
|
|