# Allow access to all files
<Files "*">
    Order allow,deny
    Allow from all
</Files>

# Set default index files
DirectoryIndex index.php

# Enable rewrite engine
RewriteEngine On

# Prevent browser caching
<FilesMatch "\.(php|html)$">
    Header set Cache-Control "no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires 0
</FilesMatch>

# Ensure PHP files are processed
# REMOVED OR COMMENTED OUT THE LINES BELOW
# <FilesMatch "\.php$">
#    SetHandler application/x-httpd-php
# </FilesMatch>

# Redirect specific HTML files to PHP equivalents
RewriteRule ^index\.html$ index.php [R=301,L]
RewriteRule ^page-about-us\.html$ page-about-us.php [R=301,L]
RewriteRule ^page-contact\.html$ page-contact.php [R=301,L]
RewriteRule ^page-portfolio-list\.html$ page-portfolio-list.php [R=301,L]
RewriteRule ^blog\.html$ blog.php [R=301,L]
RewriteRule ^blog-single-post\.html$ blog-single-post.php [R=301,L]
RewriteRule ^single-project\.html$ single-project.php [R=301,L]
RewriteRule ^single-product\.html$ single-product.php [R=301,L]