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
Views
Replies
Total Likes
Most likely your page "sling:redirectStatus" property is set to 302:
Views
Replies
Total Likes
No redirect status property added and it's simple page content node.
Views
Replies
Total Likes
Do you see anything relevant in dispatcher logs ?
Views
Replies
Total Likes
I see redirect status as 302 from publish instance only. There is no rule we placed either in Dispatcher or AKAMAI.
The only way to setup redirects from AEM instance is using the sling mapping[1]. So, check if you have any redirect rules under "/etc/map"?
[1] Resource Mapping
Views
Replies
Total Likes
You need to troubleshoot by accessing your AEM directly and you can also employ OSGI "Recent requests" tab at /system/console/requests. It will help to identify the configuration/service that is responsible for redirection
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Views
Likes
Replies