We have several sites on one bloomreach instance. We want to use the url rewriter for vanity urls and some other redirecting use cases we have. The issue we are hitting is that the rules seem to apply to all of the sites.
If I create a rule redirecting /vanity-url/ to /publication/2012/08/my-publicaiton-with-a-long-url it will work but will also be happening on sites other than the one it is intended for.
We would like a way to manage the redirects for each site independently. How can we create rules that apply to a specific site? We also want the rules to be portable to test environments so we do not want to include fully qualified urls in the rules. Any ideas on the best way to achieve this?
My first thought was something along the lines of:
- create a folder per site under /content/urlrewriter
- write our own version of HippoRewriteFilter thats distinguishes the site the request was for and invoke only rules from the relevant folder.
It seem like this could work but would create a maintenance issue for us. Is there a way to use the url rewriter out of the box to achieve this?