What is the term for a name converted to a URL parameter?

旧城冷巷雨未停 提交于 2019-12-11 19:07:34

问题


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, or 427ds17v223


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!