1 Reply Latest reply: Aug 2, 2013 3:43 PM by ClareR-Oracle RSS

    Redirect request using Servlet pipeline based on domain name




      We are planning to launch 2 sites [one with the existing code and another one as a beta version]. Few users will be redirected to the beta version site and rest all will continue to use the older site. We are planning to achieve this by having a 2 separate domain and based on which URL they use we will route them to the respective site. Is this achievable using ATG servlet pipeline where it will check from which domain the request came and route the user based on that? Any pointers to this will be helpful.

        • 1. Re: Redirect request using Servlet pipeline based on domain name

          Will the main site and beta version run in the same ATG instances (cluster) or separate ones?  If both sites run on the same cluster, you can use the multisite feature that was introduced in release 10.0.  You don't need to redirect or write any special code.  If the sites run on separate clusters, then you could, in theory, write a custom pipeline servlet to redirect to somewhere else.  I don't understand how that somewhere else would be any different from the information in the visitor's original URL.  If different visitor URLs need to be handled by different clusters, then I'd think it would be easier to have your web front end route each domain to its own ATG cluster.  In that case, you wouldn't need a pipeline servlet and browsers wouldn't need to process extra redirects.