If I had a PHP script named hello.php, I can access it without adding .php, like so: http://127.0.0.1/hello
I assume this has something to do in my httpd.conf file, but exactly what part of it makes Apache do this?
My PHP files can be accessed without adding .php. How?
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Actually if you enable "MultiViews" in the apache configuration file your PHP files can be accessed without the use of the .php.
Remove MultiViews from any Alias or Directory blocks in the http.conf and all php files will need the .php to be executed.
Code: Select all
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
AllowOverride None
Order deny,allow
Deny from all
</Directory>