RewriteEngine On

# Always serve https://www.bittstampresourcesltd.org
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.bittstampresourcesltd\.org$ [NC]
RewriteRule ^ https://www.bittstampresourcesltd.org%{REQUEST_URI} [L,R=301]

# Redirect legacy .html pages to their .php counterparts
RewriteRule ^(about|contact|faqs|terms|privacy|policy|register|login)\.html$ https://www.bittstampresourcesltd.org/$1.php [L,R=301]
RewriteRule ^Contact-2\.html$ https://www.bittstampresourcesltd.org/contact.php [L,R=301]

# Prefer clean root URL over index.php requests
RewriteRule ^index\.php$ https://www.bittstampresourcesltd.org/ [L,R=301]
