htaccess check for cookie
Posted on 2004-11-01
I have a login screen that creates a cookie called 'login' with a value of 'yes' when a user logs in to my CMS. For as long as the cookie exists, the user has access to the CMS. I also have phpmyadmin on the server, and i want to restrict access to phpmyadmin, using the same login screen and cookie scheme.
so, when a user tries for the phpmyadmin directory, i want to have the htaccess file in that directory check for the login cookie with a value of 'yes.' if no cookie, redirect to login page.
can someone please help me write the /phpmyadmin/.htaccess file to check for the 'login' cookie with a value of 'yes,' and redirect to ../login.php if no cookie?