httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Thompson" <c...@weblinkservices.com>
Subject Re: [users@httpd] Redirect syntax
Date Wed, 13 Aug 2003 16:04:51 GMT

> >
> > On Tue, 12 Aug 2003, Chad Thompson wrote:
> >
> > > I have 3 different webservers within my lan.  Apache, IIS, and
> SwiftForth.
> > > All of my traffic comes into my Apache, then I am supposed to redirect
> what
> > > I need out to the others.  This is where I get stuck.
> > >
> > > I have
> > > Redirect permanent /dialer http://172.26.0.103
> > > ProxyPass       /dialer http://172.26.0.103
> >
> > These two directives conflic.  Either you Redirect, or you proxy, but
you
> > can't do both.  Redirect tells the client to request the new URL, while
a
> > reverse proxy gets the new url itself and returns it to the client.
See:
> > http://httpd.apache.org/docs-2.0/urlmapping.html#redirect
> > http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#forwardreverse
> >
> > > My problem comes when i try to redirect a full domain to the IIS box.
> > > I even tried redirecting all other traffic to the IIS box... but to no
> > > avail.
> > >
> > > Redirect permanent *[^dialer] http://172.26.0.75
> > > ProxyPass       *[^dialer] http://172.26.0.75
> > > ProxyPassReverse        *[^dialer]   http://172.26.0.75
> > >
> > > Am I heading in the right direction?
> >
> > You'll probably need to use mod_rewrite for this.  Something like
> >
> > RewriteCond %{REQUEST_URI} ^/dialer
> > RewriteRule /(.*) http://172.26.0.103/$1 [P,L]
> >
> > RerwiteRule /(.*) http://172.26.0.75/$1 [P,L]
> >
> > Replace the P flag with R if you want a redirect rather than a reverse
> > proxy.
> >
>
> Ok, I thnk I understand the distinction between Proxy and Rewrite now....
I
> dont think however that rewrite is what I need.  (Please correct me if I'm
> wrong :-)
>
> I have only one place of entry for the world to see my 3 webservers.  If I
> rewrite, that will tell the world to look for a different external ip to
> find the pages, and I have only 1 external IP.... right?
>
> If I proxy, it works well.  But there doesnt seem to be a ProxyPassMatch
to
> allow wild cards and regular expressions.
>
> Is there a way to do wild cards with ProxyPass?... or any other ideas?
>

Just as I sent the previous message I realized what you were doing w/ the
RewriteRule.  The problem there is that my IIS box requires the header
information to be able to determine the website.  And a rewrite gives the
default page instead of the proper page.

How can I format a rewrite rule to proxy to another box, but still have the
headers in place so IIS can serve the proper page?

TIA
Chad


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