I'm trying to redirect all requests to a domain from a particular user-agent to a subdomain. My rule is as follows:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Test Agent/(.*)$ // <-- Line 4
RewriteRule ^(.*)$ https://test.domain.com/$1 [L,302]
But all I get when starting the web server is:
Syntax error on line 4 of /var/www/misafe/internal/misafe-old.conf:
RewriteCond: bad flag delimiters
It looks OK to me but I'm obviously missing something and the error is not helping much. Any ideas?
Thanks, J