RewriteEngine On

# Set default homepage
DirectoryIndex index.html

# Remove .html extensions for other pages
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^([^/]+)/?$ $1.html [L]

# Proper 404 page without redirect
ErrorDocument 404 /error.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /error.html [L]
