.htaccess not working.

I recently switch web host and my .htaccess file was working fine. However, I have uploaded it to this hosting and it doesn’t seem to be working. What the code does is if the User-Agent isn’t “CSharp”. Then redirect them back to the homepage. However, it isn’t redirecting. It does nothing. a quick help would be appreciated. Thanks

Regards, forlorn

CODE:

On which folder did you put this code exactly? I checked your website but I can’t find it.

@Admin said:
On which folder did you put this code exactly? I checked your website but I can’t find it.

htdocs/handlers/.htaccess

or

/handlers/.htaccess

I checked the code and it looks like you forgot to enable rewrite rules using the RewriteEngine On statement. If that statement is not present anywhere in the .htaccess chain, your rewrite rules will not take effect.

@Admin said:
I checked the code and it looks like you forgot to enable rewrite rules using the RewriteEngine On statement. If that statement is not present anywhere in the .htaccess chain, your rewrite rules will not take effect.

Thank you very much. Your support was genuinely appreciated.