[ic] Redirecting Based on Domain

Jason Kohles interchange-users@interchange.redhat.com
Wed Jan 2 13:40:00 2002


On Wed, Jan 02, 2002 at 01:31:33PM -0500, Michael Stearne wrote:
> I was thinking about mod_rewrite and may do that, but was also looking 
> for an Interchange way to do it so if the application was moved there 
> would be less things to configure (Interchange AND Apache).  But I will 
> look at both.  

There isn't an Interchange way to do it, because the request doesn't even
hit Interchange until after the redirect happens, so it must be done in the
web server.


> Thanks,
> Michael
> 
> Jonathan Melhuish wrote:
> 
> >On Wednesday 02 January 2002 11:45, you wrote:
> >
> >>I have to do some redirecting of the user based on which URL they use to
> >>some into my site with based on subdomain name.  For example:
> >>
> >>http://am.mydomain.com/
> >>
> >>should be replaced with
> >>
> >>http://www.mydomain.com/fea/index.html?linecode=AM
> >>
> >
> >Assuming you are running Apache, you could do this with a Rewrite rule in 
> >your httpd.conf.  This would have the advantage of being instantly applicable 
> >to any subdomain, which could be significantly easier than putting different 
> >re-direct pages on the server for each subdomain (and setting up virtual 
> >hosts for each).
> >
> >The only down side is that mod_rewrite, whilst extremely powerful, is very 
> >complicated (bit like Interchange, really), to the extent that understanding 
> >it requires a fair bit of effort.  So my advice is either to read the 
> >following links and to try and learn it, or, much easier, find somebody kind 
> >who understands it already!
> >
> >http://httpd.apache.org/docs/mod/mod_rewrite.html
> >http://httpd.apache.org/docs/misc/rewriteguide.html
> >
> >Jon
> >_______________________________________________
> >interchange-users mailing list
> >interchange-users@interchange.redhat.com
> >http://interchange.redhat.com/mailman/listinfo/interchange-users
> >
> >
> 
> 
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users

-- 
Jason Kohles                                 jkohles@redhat.com
Senior System Architect                      (703)786-8036 (cellular)
Red Hat Professional Consulting              (703)456-2940 (office)