RewriteEngine On

# Remove trailing slash (except real directories)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^ %1 [R=301,L]

# Pretty URLs for landing pages
RewriteRule ^blocked-drains$ blocked-drains.php [L]
RewriteRule ^hot-water$ hot-water.php [L]

# Remove .php extension (only if file exists)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]
