问题
I want to learn what is it called -if there is any name for it- when you convert a name to a URL parameter, like, urldecode()
in PHP.
Suppose in my database, I list some TV series, and one row is for The Big Bang Theory, I usually do it like:
title name
------ -----
The Big Bang Theory the-big-bang-theory
So is there a specific name for the second column, named "name"?
I remember something like "slug" or "stub" from one of the CMS’.
回答1:
http://example.com/articles/the-big-bang-theory?revision=1
Path:
/articles/the-big-bang-theory
Path segments/subcomponents:
articles
the-big-bang-theory
Slug (not a technically defined term):
the-big-bang-theory
http://example.com/articles/427ds17v223?revision=1
Path:
/articles/427ds17v223
Path segments/subcomponents:
articles
427ds17v223
Slug (not a technically defined term):
none, or427ds17v223
There are various definitions for the term slug. Some may always call the last path segment a slug, some may use this term only if the last path segment is human-readable/understandable.
来源:https://stackoverflow.com/questions/21339689/what-is-the-term-for-a-name-converted-to-a-url-parameter