: Need help to understand the URL for dynamic content As I understand, web servers are able to map the path component of an URL either into local file system resource or web-application name.
As I understand, web servers are able to map the path component of an URL either into local file system resource or web-application name. Example for former would be www.example.com/index.html. In this case, as I understand it, the web server would simply take the /home/www/index.html file and return it to requester. Example for web-applications would be www.example.com/get-page.php?home=aaa.html. Am I correct that get-page.php is the web-application name, i.e script file /home/www/get-page.php which is executed in server and aaa.html is a value for variable home used in this script?
More posts by @Fox8124981
1 Comments
Sorted by latest first Latest Oldest Best
In short, yes you are correct. The only big part of the equation you are missing is server-side URL rewriting - where essentially a request for www.example.com/aaa could be internally redirected by the web server software to
www.example.com/get-page.php?home=aaa.html
as a method of having more user-friendly URL's or pretty URL's.
If your webserver software is Apache then this is achieved using .htaccess files and RewriteCond/RewriteRule.
See mod_rewrite documentation for more information about this.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.