質問編集履歴
2
動的について追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
heaccessで複数のリダイレクト処理を行いたいのですがうまくいきません。
|
2
2
|
|
3
3
|
やりたいことは
|
4
|
-
http://www.example.com/1
|
4
|
+
http://www.example.com/?act=1 を http://www.example.com/11.html へリダイレクト、
|
5
|
-
http://www.example.com/2
|
5
|
+
http://www.example.com/?act=2 を http://www.example.com/22.html へリダイレクト
|
6
|
-
http://www.example.com/3
|
6
|
+
http://www.example.com/?act=3 を http://www.example.com/33.html へリダイレクトです。
|
7
7
|
|
8
8
|
下記のよう記載しましたがダメでした。
|
9
9
|
|
@@ -20,9 +20,9 @@
|
|
20
20
|
RewriteCond %{REQUEST_FILENAME} !^(.*).(gif|png|jpe?g|css|ico|js|svg)$ [NC]
|
21
21
|
RewriteRule ^(.*)$ index.php [QSA]
|
22
22
|
|
23
|
-
RewriteRule ^
|
23
|
+
RewriteRule ^?act=11$ http://www.example.com/11.html [R=301]
|
24
|
-
RewriteRule ^
|
24
|
+
RewriteRule ^?act=22$ http://www.example.com/22.html [R=301]
|
25
|
-
RewriteRule ^
|
25
|
+
RewriteRule ^?act=33$ http://www.example.com/33.html [R=301,L]
|
26
26
|
|
27
27
|
</IfModule>
|
28
28
|
|
1
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
heaccessで複数のリダイレクト処理を行いたいのですがうまくいきません。
|
2
2
|
|
3
3
|
やりたいことは
|
4
|
-
http://
|
4
|
+
http://www.example.com/1.html を http://www.example.com/11.html へリダイレクト、
|
5
|
-
http://
|
5
|
+
http://www.example.com/2.html を http://www.example.com/22.html へリダイレクト
|
6
|
-
http://
|
6
|
+
http://www.example.com/3.html を http://www.example.com/33.html へリダイレクトです。
|
7
7
|
|
8
8
|
下記のよう記載しましたがダメでした。
|
9
9
|
|
@@ -18,11 +18,11 @@
|
|
18
18
|
|
19
19
|
RewriteCond %{REQUEST_FILENAME} !-f
|
20
20
|
RewriteCond %{REQUEST_FILENAME} !^(.*).(gif|png|jpe?g|css|ico|js|svg)$ [NC]
|
21
|
-
RewriteRule ^(.*)$ index.php [QSA
|
21
|
+
RewriteRule ^(.*)$ index.php [QSA]
|
22
22
|
|
23
|
+
RewriteRule ^1.html$ http://www.example.com/11.html [R=301]
|
24
|
+
RewriteRule ^2.html$ http://www.example.com/22.html [R=301]
|
23
|
-
RewriteRule ^
|
25
|
+
RewriteRule ^3.html$ http://www.example.com/33.html [R=301,L]
|
24
|
-
RewriteRule ^http://●●.jp/2$ http://●●.co.jp/2 [R=301,L]
|
25
|
-
RewriteRule ^http://●●.jp/3$ http://●●.co.jp/3 [R=301,L]
|
26
26
|
|
27
27
|
</IfModule>
|
28
28
|
|