I've produced page that each new user is rerouted to upon visit, it sets a cookie that enables accessibility relaxation of my website. I wish to add exception for this rule for many sites as well as their bots:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} http://www.site1.com [NC,OR]
RewriteCond %{HTTP_REFERER} http://www.site2.net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} bot1 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} bot2 [NC]
RewriteRule .? - [S=1]
RewriteCond %{HTTP_COOKIE} !yes=1 [NC]
RewriteRule !^(script1.php|script2.php)$ script2.php [L]
</IfModule>

As you can tell, when the cookie does not exist or !=1 every user is rerouted to script2.php.

I authored some exceptions, but it sometimes works, and often it does not.

I have made a mistake somewhere, however i aren't seeing it.

Are you able to assist me to with this particular? Appreciate you time.

I'd rather use [L] rather than [S=1].

Next, I'd perform a exterior redirect to script2.php, therefore it is not cached (improperly). So use [R,L] rather than just [L] in your last rule.