Home
Position: 主页>apache>

removing .php extension from URL help

Time:2010-01-20 05:22soucre:未知 作者:admin click:clicks
Hi I need to remove the .php extension using .htaccess from my URL. I have tried different .htaccess code by searching in the net but none is fruitful.. I have the least idea about regular expressions. can anyone please help? my URL is http:///www.dom

   Hi
I need to remove the .php extension using .htaccess from my URL.
I have tried different .htaccess code by searching in the net but none is fruitful..

I have the least idea about regular expressions. can anyone please help?

my URL is
http:///www.domainname.com/projectna...p/region/state

here region and state are dynamically changing... and i want to remove .php from filename.php ||| what does your .htaccess code currently look like? ||| Say your .htaccess file is in /projectname/. Try the following:

Expand|Select|Wrap|Line Numbers ||| you could also tell php to parse a file with your own custom file extension. for instance in your case you could do

http://www.domainname.com/projectname/file.name

by putting something like this into your .htaccess

Expand|Select|Wrap|Line Numbers |||#

------line----------------------------
Recommend
Hottest