The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other /whatever/ instead of /whatever.php ? Re: /whatever/ instead of /whatever.php ?


Since a lot of sites are generated dynamically now, it’s a lot easier to have the system set up folders automatically and place an index.php or index.html inside that folder.

You can also remove extensions via .htaccess:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
# Replace html with your file extension, eg: php, htm, asp

Why do people do it? It looks a hell of a lot cleaner to me. Which would you rather see in the url:

It looks a lot cleaner without the index.php beside it, and it means it’s one less thing for users to remember.