httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] question about mod_rewrite
Date Tue, 12 Apr 2005 16:04:21 GMT
On Apr 12, 2005 11:46 AM, Noah <sitz@onastick.net> wrote:
> On Tue, Apr 12, 2005 at 09:05:20AM -0400, Joshua Slive wrote:
> 
> > > it redirect all queries to the maintenance.html file wich indicates
> > > that the site is under construction.
> > > now i want to tune this to redirect only certain queries, i want to
> > > redirect all queries that want to get this url range :
> > > http://myserver/apps/* -> /maintenance.html
> > >
> > > is there anyone who can help me outta there ?
> > > thanks very much
> >
> > RewriteRule     ^/apps.*$            /maintenance.html [L]
> 
> Shouldn't that read:
> 
> RewriteRule ^/apps/.*  /maintenance.html [L]
> 
> ...or even:
> 
> RewriteRule ^/apps/  /maintenance.html [L]

I assumed he didn't want to insist on the trailing slash.  Including
it in the RewriteRule will mean that apache will need to issue a
redirect to put it on before the rewriterule will take effect.

Other than that, all three are equivalent, and I just picked the one I
thought would be clearest.

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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message