Issues with .htaccess.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jeyush
Forum Newbie
Posts: 3
Joined: Mon Jun 01, 2009 5:02 am

Issues with .htaccess.

Post by Jeyush »

I want my .php files to be display as .htm files and for that I have write some code in .htaccess like,

Code: Select all

Options +ExecCGI
AddHandler cgi-script .
ErrorDocument 404 /error.php
 
RewriteEngine On 
RewriteBase /
 
#RewriteRule ^\index.php$ - [F]
RewriteRule ^index.htm$ index.php   
RewriteRule ^(.*)\.htm$ $1.php [nc]
But this code dont work for me right now.

1) If I restrict that index.php page then it's fine with it.
2) but if I parse those .php files into .htm files then the code is not working well. Not showing any parsing into the url.

Please help me with it.

I done all changes from localhost and see those changes on localhost too.

Thanks in advance.
Post Reply