Now the URL is mostly in the form of/xx/xx, compared to what is the advantage of xx=xx&xx=xx?
Like, pagenum=1&userid=1 compared to/PAGENUM/1/USERID/1.
Reply content:
Now the URL is mostly in the form of/xx/xx, compared to what is the advantage of xx=xx&xx=xx?
Like, pagenum=1&userid=1 compared to/PAGENUM/1/USERID/1.
Who told you that the URLs are now in the form of/xx/xx, isn't that what it used to be?
/IS Path
? The following is the query
See Google and Baidu's query URL to find out
Isn't it more semantic?
xx.php/pageNum/1/userId/1
User with UserID 1 on page 1th to get/delete (different HTTP methods)
RESTful API Interface
Address static, easy to ingest
The main word is pseudo-static fixed link it. xx=xx&xx=xx is a get pass value, there is no comparison between the two.
For example, the /post/edit/1024
last is to rewrite or to the /index.php?c=post&a=edit&id=1024
/post.php?a=edit&id=1024
PHP processing, or directly to the URI to index.php analysis, but the former more RESTful.
Seo......
I just met this problem a while ago.
is a project in. NET MVC, which is a manually configured route (path), and the leader says let's do it the first way.
For example, my meeting Details page: .../meeting/detail/1
The number is the ID of the meeting;
Later meetings have classified, large categories of small categories of the mess, to change the bread crumbs Show, and then add a parameter to solve it .../meeting/detail/1/1
, bad, a lot of list page into the details page, the previous list page is walking this one detail page: Search, live broadcast, recording, experts, international waiting. And then changed a lot of files, logical. Rue de Vaugirard, how also is finished, anyway still do not like this form of path, at least the second kind does not cause the program error.
Later, the project went online before the security testing with professional tools, raised a bug: The path .../search/import
can not be accessed!!
I go to your sister's, this is import is the search keyword , you give me when the path?
URL which form, or see a person likes it, I feel.
Two all can, look at the scene, not all the scenes are suitable for restful,rest stand in all resources, the creation of its only through the HTTP verb. It's like Java considers everything as a noun. But it's troublesome to consider various designs. ,”?“ Rather simple and rude, the speed may be faster (though meaningless for human time).
The second is a targeted query directly by path