httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean DeNigris <>
Subject Re: [users@httpd] Can you go outside the .htaccess directory with Rewrite Rule?
Date Sat, 28 Feb 2009 03:05:27 GMT
> On Fri, Feb 27, 2009 at 4:27 PM, Sean DeNigris  
> <> wrote:
> > If I put a .htaccess file in my webroot with the following rule:
> > RewriteRule ^(.*)$ /cgi-bin/scriptname.cgi?action=$1
> >
> > Can I specify a script file outside the directory with  
> the .htaccess file in
> > it (i.e. outside the webroot)?
> Yes, the 2nd argument to RewriteRule is actually a filesystem path and
> not a URL -- rewrite helps you out sometimes when you use the latter.
Thanks for the help!!
Ok I'm encouraged that it's possible, but my example resolves to / 
~user/public_html/cgi-bin/, not /~user/cgi-bin/, which is what I want,  
and what it sounds like you're saying it should do, so how do I get  
this filesystem behavior?
> With the default conf, directory trees are explicitly allowed to be
> served via "order" and "allow", so whatever you rewrite to will to
> have a Directory stanza that allows access.
I'm not sure what this means.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message