Page 1 of 1

Issues with .htaccess.

Posted: Mon Jun 01, 2009 5:12 am
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.