Posted by Justin Koivisto on 12/19/05 16:18
deja@homerlex.mailshell.com wrote:
[snip]
> I need a script that will first test to see if the user is trying to
> download a file from a specific location (ie "/content/protected") If
> they are downloading from this folder then I want to see if a specific
> variable is set in the cookie (ie loggedin="true").
[snip]
> I did find a script that checks the cookies and does a redirect.
> I just need the stuff about only checking the cookie for a specific
> directory and appending the file name to the redirect.
>
> Here is the sample I found:
> RewriteEngine on
> RewriteCond %{HTTP_COOKIE} !^.*loggedin=true.*$
> RewriteRule .*$ http://www.domain.com/login.php
>
> Your help is greatly appreciated!
>
Before the existing RewriteCond, add this:
RewriteCond %{REQUEST_URI} /content/protected
F'up to: alt.apache.configuration
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
Navigation:
[Reply to this message]
|