i have included following code in .htaccess file and place it my
project root folder..!!

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [nc]

but url still showing .php extension like localhost/project/index.php instead of localhost/project/index.htm.!! i have check the mod_rewrite is loaded.!!

or anybody can tell another way to rewrite the url...??

any help will me appriciated

thanx

I'm not sure but it might be an idea to remove the [nc]
The [nc] stuff is for advanced users mainly. Also yes it does work but both ways will work. So basically if you link to the htm version then it should work just as well as if you link to the php version.

it does nt work..!!

I just tested your .htaccess file and it works perfectly. All you need to do is just link to the .htm file instead of the .php file.

let me try it

i didnt understand the last post..!!

i dont have any html file.!! i have only php files..!!

all i want to convert.php extension to .htm extension in address bar.!

localhost/project/index.php into localhost/project/index.htm

can u guide me little bit..!

I just tested your .htaccess file and it works perfectly. All you need to do is just link to the .htm file instead of the .php file.

thanks brother now i solve the problem.. actually i m new to .htaccess..!!

i didnt change the .php extension to htm..!!

can u suggest me any tutorial of .htaccess.!! i will be greatful to u..!!

if i am not wrong there is a close relation between your permalink structure and the server installed.make sure your are using the right code for your server.

Ex: for apache server .htaccess file exists

Ex: for iis server the method to change your permalink is completelt different.

hope this helps.:)
<FAKE SIGNATURE>

can u suggest me any tutorial of .htaccess.!! i will be greatful to u..!!

All it takes is a quick google search and I found just for you the following link which is a step by step guide with some usefull sublinks.
http://www.freewebmasterhelp.com/tutorials/htaccess/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.