What is the complete process from entering a url to the browser's address bar to get the rendered page in browser?

后端 未结 4 503
别那么骄傲
别那么骄傲 2021-01-30 07:44

I\'m thinking about this question for a long time. It is a big question, since it almost covers all corners related to web developing.

In my understandi

4条回答
  •  温柔的废话
    2021-01-30 08:02

    I can describe one point here -

    Determining which file/resource to execute, which language interpreter to load.

    Pardon me if I am wrong in using interpreter here. There may be other mistakes in my answer, I will try to correct them later and include proper technical terms for things.

    When the web server (e.g. apache) has received the URI it checks if there is any existing rewrite rule matching it. In that case the rewritten URI is taken. In either case, if there is no file name to end the URI, the default file is loaded, which is generally index.html or index.php etc. According to the extension of the file name, the appropriate apache module for server-side programming language support is loaded, e.g. mod_php for PHP, mod_python in case of python. The appropriate server side language interpreter (considering interpreted languages like PHP) then prepares the final HTML or output in some other form for the web server which finally sends it as the HTTP response.

提交回复
热议问题