Friday, 24 June 2022

Gatsby Dynamic splat .htaccess for Apache

How to make Apache play nice with Gatsby Dynamic splat routes (e.g. [...].tsx)? Couldn't find it anywhere - so here is what I figured out:

RewriteEngine On

RewriteBase /

RewriteRule ^index\.html$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^app/(.*)$ /dynaappmic/[...]/index.html  [L]

No comments:

Post a Comment