質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -59,3 +59,71 @@
|
|
59
59
|
|
60
60
|
|
61
61
|
よろしくお願いいたします。
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
追記
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
受け取ったゲットのパラメータをPHPで条件分岐させてheader関数で無理やりurlを書き換える方法でやることにしましたが、こんなやり方聞いた事がないので、これで大丈夫なのか心配です。
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
```lang-<ここに言語を入力>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<IfModule mod_rewrite.c>
|
80
|
+
|
81
|
+
RewriteEngine on
|
82
|
+
|
83
|
+
RewriteBase /root/dir
|
84
|
+
|
85
|
+
RewriteRule ^hoge\.php$ index.php [L]
|
86
|
+
|
87
|
+
RewriteRule ^moge\.php$ index.php [L]
|
88
|
+
|
89
|
+
</IfModule>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
```lang-<php>
|
98
|
+
|
99
|
+
if(!empty($_GET["tiku"]))
|
100
|
+
|
101
|
+
{
|
102
|
+
|
103
|
+
switch($_GET["tiku"]) {
|
104
|
+
|
105
|
+
case 1:
|
106
|
+
|
107
|
+
header("Location: hoge.php");
|
108
|
+
|
109
|
+
break;
|
110
|
+
|
111
|
+
case 2:
|
112
|
+
|
113
|
+
header("Location: moge.php");
|
114
|
+
|
115
|
+
break;
|
116
|
+
|
117
|
+
default :
|
118
|
+
|
119
|
+
header("Location: index.php");
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
普通URLの書き換えってこうやるのでしょうか・・・。
|