I have a php site but want it to appear as static html no matter whether the page requested os html or php. I have commented as best I can to make it obvious what I am trying to achieve.
Options +FollowSymLinks
RewriteEngine on
# Disable directory browsing
Options All –Indexes
# Prevent folder listing
IndexIgnore *
#Block viewing of .htaccess
RewriteRule \.htaccess - [F]
# Force www
RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301, L]
# Remove index file
RewriteCond %{THE_REQUEST} \/index.(php|html)\ HTTP
RewriteRule (.*)index.(php|html)$ /$1 [R=301, NC, L]
# Redirect php requests to html
RewriteRule ^(.*)\.php$ $1.html [R=301, NC, L]
# Rewrite html requests to corresponding php file
RewriteRule ^(.*)\.html$ $1.php [NC, L]
Any help much appreciated,
Allan