I have the following code in .htaccess file that is not working in Firefox 25. It's works ok with Chrome, IE, Safari.
Header unset Cache-Control
Header append Cache-Control "no-cache, must-revalidate"
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !^.*userloggedin.*$[OR]
RewriteCond %{HTTP_COOKIE} userloggedin=x
RewriteRule .* http://www.bostonneca.org/redir.php
I used the code to check if a cookie is set. If is not set, then I redirect the user to the login page. After log in, the user can access the folder.
setcookie('userloggedin', 'ok', time() + 60 * 60 * 5);
I guess it's a server issue because I cannot remove cookies with setcookie('userloggedin', '', time() - 1); To avoid this issue, on the logout I write a cookie
setcookie('userloggedin', 'x', time() + 60 * 60 * 5);
Please help!
Thanks, Adrian
RewriteLog
output and what headers go through FireBug or console ? You can handle all cookie stuff without rewrite anyways. – Daniel W.