让部分URL成为参数的东西是什么名字?

BCS*_*BCS 1 http url-rewriting

例如:

http://stackoverflow.com/questions/698627/ms-access-properties
Run Code Online (Sandbox Code Playgroud)

该数字是URL的一部分,但是是Web应用程序的参数,而不是其他选项,例如:

http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official
Run Code Online (Sandbox Code Playgroud)

所有的args都在' ?'之后.我之前使用过第二种形式,我只是想了解第一种形式.

我相信一旦我知道了什么,我就能找到我需要的东西,所以我可以谷歌.

Cha*_*rch 5

通常是URL重写.

编辑:这是对URL重写的一个很好的介绍.


Tom*_*ter 5

以URL形式传递的变量称为查询字符串.在一个网址中:

 http://examples.com?a=b&c=d&e=f
Run Code Online (Sandbox Code Playgroud)

查询字符串是?a = b&c = d&e = f

在Stackoverflow示例中,它使用URL重写,特别是使用MVC路由来制作"漂亮的URL".还有其他方法可以用其他语言来完成.有些人使用Apache的mod_rewrite(示例),而其他人则解析所请求的URI.在PHP中一个网址就好

 http://example.com/index.php/test/path/info
Run Code Online (Sandbox Code Playgroud)

可以通过读取$ _SERVER ['PATH_INFO']来解析,这是/ text/path/info.

通常,他们使用URL重写来模拟查询字符串.在Stackoverflow示例中:

 http://stackoverflow.com/questions/698711/what-is-the-name-for-that-thing-that-lets-part-of-the-url-be-an-argument
Run Code Online (Sandbox Code Playgroud)

重要的部分是问题/ 698711.您可以不受惩罚地更改问题的标题,但不能更改其他两个部分.