View Full Version : Easiest way to remove .php extensions

09-10-2009, 01:09 AM
How can I use $_SERVER["PATH_INFO"]; to remove .php from my extensions? I don't want to just use mod_rewrite because you can still access urls with .php.

I want to change from http://www.site.com/page.php to http://www.site.com/page

09-10-2009, 07:30 AM
aedrin's posts at http://www.codingforums.com/showthread.php?t=129123 may give you an idea on how to setup a system which accepts urls like /?page=home , /?page=about etc. After that, it's just a mod_rewrite technique to change those urls as /home, /about respectively.