Hello List

I have a problem with htaccess I cant quite figure out of.
I have a .htaccess file in /secure/ with something like this:
 RewriteEngine on
 RewriteCond %{HTTP_COOKIE} !^.*PHPSESSID=1234567890abcdef1234567890abc.*$
 RewriteRule .*$ - [F]

This sends 403 if the browser doesnt have the specified cookie (yes,
the .htaccess file is autogenerated). Anyway, this works perfectly for
every folder under /secure/. But I have one folder, /secure/forum/
that have another .htaccess file with other rewrite rules under like
this:
 RewriteEngine on
 RewriteRule ^file-(.*)$ show-file.php?file=$1 [NC]
But here is the problem. When I have the last rule, the first cookie
check rule doesnt apply. Why? I tought that apache was checking
htaccess file like this, 1) .htaccess 2) /secure/.htaccess 3)
/secure/forum/.htaccess. Isnt that right?
I have also tried to add [L] To the first .htaccess file to make it as
the (last rule), but that doesnt work either (or did I do it wrong).
Does anyone else have any idea? I really need this thing working with
both the .htaccess files.

Thanks
  Lars

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to