I need to block access to the folder of my Wordpress site when certain cookie value is not set. The code below added to .htaccess is not working on live website. Please help me to solve this issue
RewriteEngine On
RewriteCond %{THE_REQUEST} /wp-content/uploads/microsite-files/ [NC]
RewriteCond %{HTTP_COOKIE} !cookie_microsite=confirmMicroSite [NC]
RewriteRule ^ /news/ [L,R]