DirectoryIndex index.html

RewriteEngine On

# Old Shopify blog URLs -> new /blog/<article-handle>/
RewriteRule ^blogs/news/([^/]+)/?$ /blog/$1/ [R=301,L]
RewriteRule ^blogs/([^/]+)/?$ /blog/ [R=301,L]

# Shopify's "all products" collection -> our main "frontpage" collection
RewriteRule ^collections/all/?$ /collections/frontpage/ [R=301,L]

# Shopify functionality that has no equivalent on this static site
RewriteRule ^(cart|account|search|checkout)(/.*)?$ / [R=301,L]

# The old "Contact" page had no content; send visitors home
RewriteRule ^pages/contact/?$ / [R=301,L]

ErrorDocument 404 /index.html
