回答編集履歴
1
mod_rewrite の書き換え例
test
CHANGED
@@ -14,13 +14,27 @@
|
|
14
14
|
|
15
15
|
(これはあくまでも例であり、実際に https://teratail.com/questions.php が存在するわけではありません)
|
16
16
|
|
17
|
-
|
17
|
+
(Amazonは露骨にディレクトリ名を捏造してますが、あれもそういう事です。)
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
|
21
|
+
```
|
22
22
|
|
23
|
+
https://teratail.com/view.php?type=tag&value=HTML
|
24
|
+
|
25
|
+
https://teratail.com/view.php?type=questions&value=88502
|
26
|
+
|
27
|
+
↓
|
28
|
+
|
23
|
-
|
29
|
+
https://teratail.com/tags/HTML
|
30
|
+
|
31
|
+
https://teratail.com/questions/88502
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
mod_rewrite で上記書き換えが行われた場合、書き換え後のURLでは「tags -> HTML」「questions -> 88502」のように「カテゴリ名」と「コンテンツ名」の関係性がはっきりするメリットがあります。
|
24
38
|
|
25
39
|
|
26
40
|
|