I have a CRA app with a subdirectory where I have a CMS system. I need to redirect every request to the domain to index.html except ###.com/cms
, which needs to normally work to allow accessing the API.
I have .htaccess as such:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
I tried adding RewriteCond %{REQUEST_URI} ^/cms/?$ [NC]
as per .htaccess - exclude directory from RewriteCond but that didn't wotrk