Im building a site with JSF and i need to have the following urls:
www.---.com/domain1/page.jsf
www.---.com/domain2/page.jsf
...
www.---.com/domainN/page.jsf
In ASP.NET i was able to do that this way:
routes.MapRoute(
name: "Default",
url: "{domain}/{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });
I have tried using http://www.ocpsoft.org/rewrite/ like this:
.addRule(Join.path("/{domain}/clients/{page}").to("/clients/{page}.jsf"));
but the effect its not the same. For example when redirecting to another page inside a beans method with:
return "page?faces-redirect=true";
the url generated by that does not contain the domain part. I cant also get the domain part from the request url because its not there. How else can i achieve this?
Thanks