質問編集履歴

1

修正

2016/03/29 08:09

投稿

hio
hio

スコア15

test CHANGED
File without changes
test CHANGED
@@ -24,6 +24,20 @@
24
24
 
25
25
  ```
26
26
 
27
+ <IfModule mod_rewrite.c>
28
+
29
+ RewriteEngine On
30
+
31
+ RewriteCond %{HTTP_USER_AGENT} (iPhone|Android.*Mobile|Windows.*Phone) [NC]
32
+
33
+ RewriteCond %{QUERY_STRING} !viewmode=pc
34
+
35
+ RewriteRule ^$ /sp/ [R,L]
36
+
37
+ </IfModule>
38
+
39
+
40
+
27
41
  RewriteEngine on
28
42
 
29
43
 
@@ -36,24 +50,6 @@
36
50
 
37
51
  RewriteBase /
38
52
 
39
-
40
-
41
- RewriteCond %{REQUEST_URI} /sp/
42
-
43
- RewriteCond %{HTTP_USER_AGENT} !(iPod|iPhone|iPad|Android|Windows\ Phone)
44
-
45
- RewriteRule ^sp/(.*)$ $1 [R]
46
-
47
- RewriteBase /
48
-
49
-
50
-
51
- #viewmode=pc パラメータ持っていた場合はリダイレクトしない
52
-
53
- RewriteCond %{HTTP_COOKIE} !viewmode=pc
54
-
55
- RewriteCond %{QUERY_STRING} !viewmode=pc
56
-
57
53
  ```
58
54
 
59
55