httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert L. Harris" <Robert.L.Har...@rdlg.net>
Subject Re: Rewriting a URL
Date Fri, 11 Jan 2002 17:00:53 GMT

What are the letters in bracets?  


Thus spake Joshua Slive (joshua@slive.ca):

> 
> > From: Robert L. Harris [mailto:Robert.L.Harris@rdlg.net]
> 
> >     RewriteRule ^.*gonzo.*company.com/(.*)
> > http://site1.company.com/$1 [L,R]
> >
> >
> > The theory would be to rewrite any outbound instance of "gonzo1"
> > to "site1"
> > for the hostname.  I found the logging directive and see this in my logs:
> 
> > The first problem is that the url it's reading doesn't seem to have the
> > hostname.  Ummm, that's not a good thing.
> 
> That's right.  RewriteRule matches only on the part of the URL following the
> hostname and port.  What you want is something like (untested):
> 
> RewriteCond %{HTTP_HOST} gonzo.*company.com [NC]
> RewriteRule (.*) http://site1.company.com/$1 [L,R]
> 
> 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
> For additional commands, e-mail: users-help@httpd.apache.org



:wq!
---------------------------------------------------------------------------
Robert L. Harris                |  Micros~1 :  
Senior System Engineer          |    For when quality, reliability 
  at RnD Consulting             |      and security just aren't
                                \_       that important!
DISCLAIMER:
      These are MY OPINIONS ALONE.  I speak for no-one else.
FYI:
 perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'


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


Mime
View raw message