質問編集履歴
3
対象ディレクトリ以下のhtaccess情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,6 +26,112 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
どのようにすれば期待する事柄を
|
29
|
+
どのようにすれば期待する事柄を実現できるでしょうか。
|
30
30
|
|
31
31
|
ご教授お願いします。
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
------追記------
|
36
|
+
|
37
|
+
Document root配下 `aaaa/`の中身はcakephp2のソースが存在してます。
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
aaaa┐
|
42
|
+
|
43
|
+
├.htaccess ※1
|
44
|
+
|
45
|
+
├app┐
|
46
|
+
|
47
|
+
│ └.htaccess※2
|
48
|
+
|
49
|
+
│
|
50
|
+
|
51
|
+
├webroot┐
|
52
|
+
|
53
|
+
└.htaccess※3
|
54
|
+
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
と3つhtaccessがあります。
|
60
|
+
|
61
|
+
上記.htaccessの内容は以下です。
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
※1
|
68
|
+
|
69
|
+
<IfModule mod_rewrite.c>
|
70
|
+
|
71
|
+
RewriteEngine on
|
72
|
+
|
73
|
+
# Uncomment if you have a .well-known directory in the root folder, e.g. for the Let's Encrypt challenge
|
74
|
+
|
75
|
+
# https://tools.ietf.org/html/rfc5785
|
76
|
+
|
77
|
+
#RewriteRule ^(.well-known/.*)$ $1 [L]
|
78
|
+
|
79
|
+
RewriteRule ^$ app/webroot/ [L]
|
80
|
+
|
81
|
+
RewriteRule (.*) app/webroot/$1 [L]
|
82
|
+
|
83
|
+
</IfModule>
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
※2
|
92
|
+
|
93
|
+
<IfModule mod_rewrite.c>
|
94
|
+
|
95
|
+
RewriteEngine on
|
96
|
+
|
97
|
+
# Uncomment if you have a .well-known directory in the app folder, e.g. for the Let's Encrypt challenge
|
98
|
+
|
99
|
+
# https://tools.ietf.org/html/rfc5785
|
100
|
+
|
101
|
+
#RewriteRule ^(.well-known/.*)$ $1 [L]
|
102
|
+
|
103
|
+
RewriteRule ^$ webroot/ [L]
|
104
|
+
|
105
|
+
RewriteRule (.*) webroot/$1 [L]
|
106
|
+
|
107
|
+
</IfModule>
|
108
|
+
|
109
|
+
```
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
```
|
114
|
+
|
115
|
+
※3
|
116
|
+
|
117
|
+
<IfModule mod_rewrite.c>
|
118
|
+
|
119
|
+
RewriteEngine On
|
120
|
+
|
121
|
+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
122
|
+
|
123
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
124
|
+
|
125
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
126
|
+
|
127
|
+
RewriteRule ^ index.php [L]
|
128
|
+
|
129
|
+
</IfModule>
|
130
|
+
|
131
|
+
```
|
132
|
+
|
133
|
+
です。
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
宜しくおねがいします。
|
2
タグの変更
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
リダイレクトではなくリライトでした
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
htaccessでのurlリ
|
1
|
+
htaccessでのurlリライトがうまくいかない
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
###### 実現したいこと
|
4
4
|
|
5
|
-
`https://****/aaaa/○○○○~`というurlを`https://****/bbbb/○○○○~`にリダイレクトしたい。
|
5
|
+
`https://****/aaaa/○○○○~`というurlを`https://****/bbbb/○○○○~`にリライト(urlを変更せず内部的にのみリダイレクト)したい。
|
6
6
|
|
7
7
|
|
8
8
|
|