February 2018
Beginner to intermediate
348 pages
9h 40m
English
This URL structure is often employed by news websites, as URLs contain indications of the articles' contents. It is formed of an article identifier, followed by a slash, then a list of keywords. The keywords can usually be ignored and not included in the rewritten URI:
|
Input URI |
http://website.com/33526/us-economy-strengthens |
|
Rewritten URI |
http://website.com/article.php?id=33526 |
|
Rewrite rule |
rewrite ^/([0-9]+)/.*$ /article.php?id=$1?; |