The following code inside an .htaccess file is behaving incorrectly..
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /test/$1 [L,QSA]
The above will correctly send requests to 'domain.com/uri-here' to the '/test/' directory.. However, requests to 'domain.com/' are not matched / routed.
I'm unsure if there's an issue with the environment, though it seems so due to same / similar code working on another server.
What am I doing wrong?
Thanks in advance!