Quote from: fr33jung at Aug 03, 2011, 02:17 AM
Edit to add: Lucas, I have to disagree with you on this one, in principle one should distinguish between files and directories clearly by using a file extension. Admittedly you don’t have to have it, but I would consider it "cleaner" to use a proper extension.
This would make sense for a file system, but we are talking database-driven web pages here. There are no files or directories, only aliases or ’virtual locations’ that ultimately point to just one file: index.php
HTTP headers provide all the information about a page’s content type and as far as I know the extension is not used at all by the browser.
Without an extension, urls are:
- shorter, easier to remember and enter correctly
- aesthetically pleasing
- SEO friendly (keyword density is not really a ranking factor these days, but it all helps)
- arguably more secure as you are not broadcasting the language your site is written in
And best of all, they avoid duplicate page issues such as the original poster described above
Those are my thoughts, and the reason why I will avoid extensions wherever possible for html files in future.
Note: I’m referring to dynamic web pages here - it’s important to keep file extensions in place for legitimate files such as images and pdf documents.