How come some site urls do not include a file extension?

后端 未结 13 1691
终归单人心
终归单人心 2020-11-28 09:38

I was browsing the internet and noticed, YouTube, for example, contains a URL like this to denote a video page: http://www.youtube.com/watch?v=gwS1tGLB0vc.

13条回答
  •  清酒与你
    2020-11-28 10:16

    What you are seeing is an example of URL routing. Instead of pointing to a specific file (e.g. page.php), the server is using a routing table or configuration that directs the request to a handler that actually renders the html (or anything else depending on the mime type returned). If you notice, StackOverflow uses the same mechanism.

提交回复
热议问题