As in title. I want to run example.com/bar.php
by using example.com/bar
as adress, but it doesn't wrong. How to set it?
Asked
Active
Viewed 555 times
0
-
Please take a look this [thread](http://stackoverflow.com/questions/1337695/remove-php-extension-with-php) – YOU Jan 24 '10 at 15:19
3 Answers
6
The simplest approach: Call it /bar/index.php
Other approaches include mod_rewrite and ForceType (assuming Apache).

Quentin
- 914,110
- 126
- 1,211
- 1,335
1
If you're using apache try adding this to your .htaccess file:
RewriteEngine on
RewriteBase /
RewriteRule ^bar$ bar.php

João Josézinho
- 2,648
- 4
- 23
- 27