Can anybody tell me if my .htaccess conditions are valid? Or if there is any change/optimization needed?
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !(^.*Google.*$) [NC]
RewriteRule ^$ /home/login/ [L,R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*Google.*$ [NC]
RewriteRule ^$ /home/ [L,R=301]
I basically want every normal user to be redirected to /home/login/. If the user agent is or contains "Google", I want them to be redirected to /home/ only.
By the way, do I need "RewriteEngine on" at the top?
Thanks!