回答編集履歴

1

mod_rewrite の書き換え例

2017/08/16 14:35

投稿

think49
think49

スコア18166

test CHANGED
@@ -14,13 +14,27 @@
14
14
 
15
15
  (これはあくまでも例であり、実際に https://teratail.com/questions.php が存在するわけではありません)
16
16
 
17
- 動的サイトを静的サイトに見せかけるのはSEO対策の側面が強と思います。
17
+ (Amazonは露骨にディレクリ名捏造してますがあれもそうう事です。)
18
18
 
19
19
 
20
20
 
21
- https://teratail.com/questions.php?id=88502 よりも https://teratail.com/questions/88502 の方が質問スレのカテゴリである事を強く主張できます。
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
- 他にも、Amazonは露骨にディレクトリ名を捏造してますが、あれもそういう事です。
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