Reputation: 593
I am confused as to how, for example, this page is loaded. I am looking at the navigation bar in my browser and it says:
stackoverflow.com/questions/ask
I am used to seeing this for the pages I develop:
Example.com/ask.php
Why does their URL not contain page names or values? Or does it? If so, how.
Thanks.
Upvotes: 1
Views: 65
Reputation: 272507
The URL does not have to correspond to an actual pathname in the local filesystem on the server, that's just convention.
Often, the URL will be rewritten.
Upvotes: 3
Reputation: 174957
This kinds of jobs are usually done with URL rewriting. Depending on your server, there are several ways of achieving it.
The most famous one is the mod_rewrite
utilized in the .htaccess
file Apache servers have.
Upvotes: 1