jou00jou Posted December 12, 2008 Share Posted December 12, 2008 As the subject suggests, I would like to use Mod Rewrite to rewrite the url from example.com/contact.php to example.com/contact I am currently learning how to use mod rewrite and read at least 10 tutorials but for some reasons I still can't create the rule. I simply need to remove the php trailer in all the files in the directory. Here is the what I thought would work. RewriteRule ^([a-z]+)$ /$1.php [L] Below are other combinations I tried RewriteRule ^([a-z]+)$ $1.php [L] (no slash before $1) RewriteRule ^(.*)$ /$1.php [L] ... I tried more combinations but really there is no point of writing them all. Any ideas. Thanks in advance. By the way mod rewrite works on my server. I use it to rewrite www.example.com to example.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.