I want to convert the .php extension to the .html extension using .htaccess rules
.php
.html
.htaccess
I can do this, and if so, how?
RewriteEngine on RewriteRule ^(.*)\.html$ $1.php [nc]
Uses mod_rewrite. $ 1 points to the first part of the regular expression, and [nc] means case insensitive.
You can take a look at this article: http://roshanbh.com.np/2008/02/hide-php-url-rewriting-htaccess.html
EDIT: Deleted row. You don't need what I think. Also commented on what I did.
Maybe try
RewriteCond %{REQUEST_FILENAME} =-f RewriteRule ^(.*)\.php$ $1.html [NC,L] RewriteRule ^(.*)\.html$ $1.php [NC,L]