why some times pages accessing using publish ip are redirecting as 302? | Community
Skip to main content
GK-007
Level 9
Sep 21, 2019 6:46 PM UTC

why some times pages accessing using publish ip are redirecting as 302?

Hi All,

I have been encountered a problem that I have set up a redirect on a page and i am trying to access the source page using direct publish instance's ip, it redirects as 302 instead of 301.

Source Page : abc.html

Target Page  : xyz.html

Eg: <publish-ip>:<port-no>/content/..../..../abc.html --> <publish-ip>:<port-no>/xyz.html

We don't have any explicit redirects at Dispatcher or AKAMAI to redirect as 302.

I see there is something missing at publish instance which redirects as 302?

Thanks,

Kishore

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

8 replies

GK-007
GK-007Author
Level 9
Sep 26, 2019 6:39 PM UTC

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

As mentioned in the above link,we might need to write a proxy servlet which prevents to redirect as 302 and explictly redirect as 301

We try see this option and see if it fixes our issue.

Thank you all for your help and time!!!

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

Translate
Employee
Sep 25, 2019 1:33 AM UTC

If all the above-mentioned configurations do not address the issue, I would take a look at the template code to see how it is handling redirecting. You can modify the status in the code as needed.

Translate
Employee
Sep 21, 2019 7:42 PM UTC

Most likely your page "sling:redirectStatus" property is set to 302:

Translate
GK-007
GK-007Author
Level 9
Sep 22, 2019 6:15 PM UTC

No redirect status property added and it's simple page content node.

Translate
Employee
Sep 22, 2019 10:53 PM UTC

Do you see anything relevant in dispatcher logs ?

Translate