How is Apache mapping files without extensions?

My local dev setup is mapping things like http://mydomain.dev/testhtmlpage to testhtmlpage.html and http://mydomain.dev/testphppage to testphppage.php. The browser stays on the orginally enter URL. The thing is I didn't configure my machine orginally and although I have a decent handle on it now I can't find where this behaviour is being defined.

I've checked my httpd.conf and the two included areas with no luck.

My httpd.conf: http://denishoctor.me/myhttpdconf.xml (view source)

In Include /private/etc/apache2/other/*.conf:

<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

Anyone got any ideas?


Solution 1:

This can be caused by a number of things, from rewrite rules to content negotiation. Judging by your httpd.conf, the reason in this particular case is because you have Multiviews turned on.

Excerpt from your config:

Options Indexes FollowSymLinks MultiViews

Change it to this and restart Apache:

Options Indexes FollowSymLinks