Issues with 301 Redirect | Community
Skip to main content
Level 5
December 31, 2020
Question

Issues with 301 Redirect

  • December 31, 2020
  • 1 reply
  • 1178 views

I have followed the below article to implement the 301 redirect in AEM 6.5. RedirectType & Target options are available in Page properties for the authors to make the selection. Also created separate servlet with the same selector(redirect) with 301 redirect logic in it and also assigned the highest service ranking for this servlet.

The redirectType & Target values are getting stored in jcr:content of the page. The results of the Sling Servlet Resolver is also showing the expected results. For some reason, the 301 redirect is not happening. I have tried in author (wcmmode=disabled) as well as publish instance but it doesn't work.

 

Sample Attached:

 

http://www.sgaemsolutions.com/2018/12/implement-301-and-302-redirect-in-aem.html

 

Can someone advise on this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

shelly-goel
Adobe Employee
Adobe Employee
December 31, 2020

@v1101 

Is your oob 302 redirect working? If that is working, you might want to check the logs if there are any errors for the custom servlet and try putting a debugger in your servlet to see if redirectType is getting resolved at this line: if (redirectType.equals("301")) {