On Sun, 20 Mar 2005 09:23:07 +0200, Gil Shai <GilS@xxxxxxxxxxxxxx> wrote: > There are a set of pages that I want them to be accessed by users the > following way: > > 1) If a user tries to access these pages directly, they would be forbidden. > > 1) If the Apache2 redirects (using RedirectMatch directive) the user to > these pages, they would NOT be forbidden. > > How can I do this rather simply? I don't believe there is any simple solution to this. In general, the server sees each request as independent and hence can't make distinctions like you want. If I remember correctly, "Referer" does not get reset on redirects, and therefore won't be any help (and it wouldn't be a secure solution in any case). I believe the standard way of handling this problem is to use cookies. You could probably hack-up something with mod_rewrite (not RedirectMatch) to do this. Again, this wouldn't be "secure" because you would have to use a fixed cookie. If you are interested in this, I could probably provide an example. Joshua. --------------------------------------------------------------------- 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: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx