0
votes

At work I have to regularly work on a site that uses Tomcat, Hybris and (I think?) Spring. Although I'm slowly learning, I'm quite unfamiliar with all of these technologies.

Is there a simple way to handle 301 redirects through Hybris? Perhaps through the Hybris administration console or Hybris management console?

Currently, we are using http://www.tuckey.org/urlrewrite/ and functionally, it works great. But adding a vanity URL or a URL redirect to the website involves editing / testing on localhost, then pushing urlrewrite.xml to stage and testing, then finally pushing urlrewrite.xml to the production environment.

Is there a better way to handle 301's with the technology we're using?

3

3 Answers

0
votes

Hybris is built almost entirely upon the Spring framework. I'm not sure if the site you are maintaining uses the Accelerator template for the storefront, but if it is, then you'll want to look into Spring MVC. Look for methods that are annotated with @Controller. You can do just about anything you want with Spring MVC including 301 redirects.

0
votes

There is no simple way to do this immediately in a nice configurable way in hybris. And frankly you would not want to. You should handle this in your web server.

But if you really want to, you should add a filter to the Accelerator storefront to check incoming requests against a list of items (perhaps RedirectURL Items) and redirect as required.

0
votes

Could you explain exactly what you are trying to achieve ? I think like it has been said, in most cases redirection at the web server level would be more appropriate.