httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jurgen <apa...@squarehosting.com>
Subject Re: [users@httpd] Rewrite unless ...
Date Fri, 07 Mar 2003 07:06:39 GMT
Hi,

the line added below means that everything is redirected as before, except when the request
uri starts with /stats .

RewriteEngine On
RewriteCond   %{HTTP_HOST} ^([^.]+\.mydomain\.com).*$
RewriteCond   %{REQUEST_URI} !^/stats
RewriteRule   ^(.+)         http://%1$1 [P,L]

Jurgen

On Fri, 7 Mar 2003 20:45:59 +1300
Richard Hector <rhector@paradise.net.nz> wrote:

> Hi all,
> 
> I have a rewrite setup looking something like this:
> 
> RewriteEngine On
> RewriteCond   %{HTTP_HOST} ^([^.]+\.mydomain\.com).*$
> RewriteRule   ^(.+)         http://%1$1 [P,L]
> 
> which was set up by somebody else.
> 
> My understanding is that is proxys everything matching mydomain.com
> to the http version (was https before).
> 
> Now, I've added some stuff that shouldn't be redirected - namely,
> webalizer, which I want to deal with here.
> 
> So under those lines I've got
> 
> Alias /stats /var/www/webalizer
> <Directory /var/www/webalizer>
> ....
> 
> which never get seen, because all urls have been rewritten.
> 
> What I want to know is - and this is I think more a regexp question
> than anything else - how do I alter the RewriteCond to add "except if
> the path starts with stats"?
> 
> Or is there some other way to do it?
> 
> I don't want to do to much experimenting, because it's a live server,
> and I don't want to have to restart it all the time (and risk breaking
> it each time). And the config is a bit big and complex to replicate
> easily on my own server. Now that I type it, that sounds a bit lame,
> and I'll probably start simplifying and replicating what I can ... but
> pointers are welcome all the same :-)
> 
> Thanks,
> 
> Richard
> 
> 
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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