0

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

Edited by sam023: n/a

3
Contributors
8
Replies
9
Views
8 Years
Discussion Span
Last Post by cwarn23
0

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.

0

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.

0

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..!

Edited by sam023: n/a

0

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..!!

0

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>

Edited by peter_budo: Keep It On The Site - Do not manually post &quot;fake&quot; signatures in your posts.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.