# Orderly product URL rewrite helper for Apache.
#
# Copy this file next to the built static shop files, then copy
# ../php/orderly-product.php to the same directory.
#
# Existing files and directories are served normally. Unknown root-level .html
# URLs are treated as product share URLs and are rendered by orderly-product.php.

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^(index|category|checkout|product|forretningsbetingelser)\.html$ - [L]
RewriteRule ^(assets|categories|node_modules|api|static|images|img|css|js)/ - [L]

RewriteRule ^(.+\.html)$ orderly-product.php?url=$1 [QSA,L]
