My question is there really an advantage by placing each webpage in it’s own directory compared to putting them in a directory?
( http://www.example.com/ and http://www.example.com/b.php ) vs ( http://www.example.com/ and http://www.example.com/b/ )
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you’ve seen is probably not that each file is in its separate folder, but rather a rewriting/routing engine in action. The basic concept is that you tell the server that “a URL that looks like <this>, should point to a file with a filename like <this>, and with <these> parameters”. This way, you can create easily readable URLs (which benefit both users, developers and search engines).
Example:
A user types in
domain.com/cats/Garfield/. This could be interpreted asdomain.com/index.php?category=cats&cat=Garfieldby the server. Thus, the “usage URL” is far cleaner and easier to read and remember.More info in the Wikipedia article about URL Rewriting.