[ic] Redirecting Based on Domain

Michael Stearne interchange-users@interchange.redhat.com
Wed Jan 2 13:32:00 2002


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