0

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?

1
  • Please take a look this thread Commented Jan 24, 2010 at 15:19

3 Answers 3

6

The simplest approach: Call it /bar/index.php

Other approaches include mod_rewrite and ForceType (assuming Apache).

Sign up to request clarification or add additional context in comments.

Comments

1

If you're using apache try adding this to your .htaccess file:

RewriteEngine on
RewriteBase /
RewriteRule ^bar$ bar.php

1 Comment

It works very well, but how to change every file witch .php extension?
0

If you're using Apache look at htaccess and mod_rewrite

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.