RewriteEngine On
RewriteBase /assets/b2b/

# Do not rewrite requests for static assets
RewriteCond %{REQUEST_URI} !^/assets/b2b/(assets|vendor|images|fonts|node_modules)/ [NC]
RewriteCond %{REQUEST_URI} !^/assets/b2b/(styles\.css|tailwind\.css|app\.js|favicon\.svg)$ [NC]

# Extensionless to PHP dispatcher (index and simple slugs)
RewriteRule ^$ route.php?view=index [QSA,L]
RewriteRule ^([^/.]+)/?$ route.php?view=$1 [QSA,L]

# Map any .html page to the PHP dispatcher
RewriteRule ^(.+)\.html$ route.php?view=$1 [QSA,L]
