Hi, I use apache 2.4 on centos. I want to
protect the access to
a page (/my_folder/secure)
with a
cookie (in my exemple the cookie name is : my_cookie_name) I would like that some
machine with IP 192.1.1.10 and 192.1.1.11
can access the server without
the cookie. This two IP adress d’on’t need to have the cookie for access to
/my_folder/secure) And all other IP adress are redirect to adress
https://my_register_site.com if they don’t have the cookie. How to write this ? Some exemple, and of course it does not work. Thanks in advance for any suggestions. Regards. <Directory /my_folder/secure > Session On RewriteEngine on RewriteCond %{HTTP_COOKIE} !my_cookie_name RewriteCond %{REMOTE_ADDR} !^192\.1\.1\.10$ RewriteCond %{REMOTE_ADDR} !^192\.1\.1\.11$ RewriteRule ^(.*)$ https://my_register_site.com [NC,L,R=301] </Directory> __________________________ Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing ! |