I'm trying to catch all the non-logged-in users who are trying to get to a directory (where my .htaccess is placed). If someone is not logged-in and try to access some page in this directory, it will be redirected to page "user/?login=222
"
A user is logged-in, when the Cookie "HDV-UL" starts with a 5 digit number.
This is my .htaccess:
# Working with Apache 1.3
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !HDV-UL=[0-9]{5}-[^;]+;
RewriteRule .* /user/?login=222 [R,L]
This is not working, any clues?