How to redirect from one domain to another using url rewriter?

Hi all, I was wondering if it’s possible to redirect to another domain using url rewriter? I have a situation where we have multiple channels, but 2 of them are under a different domain and now we want to redirect traffic back to the main channel.

For example, we have:

  1., containing channels 1,2 and 3,
  2., containing channel 4,
  3., containing channel 5

I’d like to redirect everyone who goes to to Is this feasible through the use of URL Rewriter? Is there a different tool within Bloomreach we can use to redirect or should this be done on a network layer instead?

Many thanks!

You can do this. Please see the documentation. I’ve linked the main page, but if you go to the specific rule pages there should be examples that show what you want to do.

Thank you for the fast reply! I’ve noticed something weird which is probably a bug in our configuration; I can configure it just found on, but when I try to configure it for, the url redirector doesn’t seem to be triggered.

Now I know this question is going to be very hard to answer without looking at the project, but do you have any idea what kind of (mis)configuration could break url redirects for a specific channel? Any tips where I should start looking? I’m kind of stumped by this issue :stuck_out_tongue:

One thing, all url rewriter rules are applied to all channels as it is a filter in tomcat that acts before the hst filter. So if another rule triggers first then a rule may be skipped. Then it may be a matter of figuring out exactly what the request is reporting and what your rule is checking, so in other words check the request to make sure your rule is set up correctly.

Make sure your regexes are correct, it’s easy to make a mistake there.

simplify until you get something that works, then start making it more relevant to see where it breaks.

Thanks! I’ll give it a try :slight_smile: