# Enable mod_rewrite module
RewriteEngine On

# Allow indexing for all pages (make sure Indexing is allowed in your server settings)
Options +Indexes

# Remove .php extension from URLs and redirect clean URLs to their .php counterparts
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(news|about|privacy-policy)$ $1.php [L]

# Enable clean URLs for specific pages (news, about, privacy-policy)
RewriteRule ^news$ /news.php [L]
RewriteRule ^about$ /about.php [L]
RewriteRule ^privacy-policy$ /privacy-policy.php [L]

# Optionally: Redirect requests to the home page to the correct index page (if you have one)
RewriteRule ^$ /index.php [L]
