You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Naku/d'Oh! <na...@lehiphop.com> on 2002/12/05 15:35:32 UTC
[users@httpd] Rewrite engine
Hi all,
I'm struggling with mod_rewrite. I would like to do the following thing :
- rewrite requests for a virtual directory DIR1 to the physical directory
DIR2
- forbid direct requests to DIR2
So here is the rewrite rule:
RewriteRule ^DIR1/.*$ DIR2
This is ok, but now i would like to forbid direct access from users to DIR2.
So i add the line
RewriteRule ^DIR2/.*$ - [F]
But this breaks the first rewrite rule :(
I tried adding [L] flag, conditions.. but i can't get anything to work.
Any idea someone?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org