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
- 857,932
- 118
- 1,152
- 1,264
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,576
- 3
- 22
- 27