AEM OOTB Page Redirect not working as expected when selectors are present | Community
Skip to main content
krishna_sai
Community Advisor
Community Advisor
October 31, 2023
Solved

AEM OOTB Page Redirect not working as expected when selectors are present

  • October 31, 2023
  • 2 replies
  • 1576 views

Hi Team,

If there is any redirect given to a page using page properties, it is working fine as expected.
For the same page, if there are any selectors, the redirect is not working as expected.

 

Steps to reproduce the issue.

In our scenario, for pages selectors get appended in the URL after login and redirects are failing due to this issue.
Can someone provide any solution/thoughts here, if you have already come across such scenarios.

 

@arunpatidar @aanchal-sikka 

Thanks,
Krishna

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

I think in that case, you have to manage those redirects as HTTPD redirects.

e.g. https://github.com/arunpatidar02/aemaacs-aemlab/blob/f96ce5316dfa4798c72d2e87d3a0b41fc49791a4/dispatcher.cloud/src/conf.d/rewrites/rewrite.rules#L12 

2 replies

arunpatidar
Community Advisor
Community Advisor
October 31, 2023

Hi @krishna_sai 
What is the use of selector here? If you are not using this selector, then you can add a redirect rule at dispatcher to redirect instead of using AEM OOTB redirects.

Arun Patidar
krishna_sai
Community Advisor
Community Advisor
October 31, 2023

Hi @arunpatidar 

After login into our website, a selector is being added to the pages based on user type and we need selector because we are having some kind of personalisation doing based on it.

 

Now when the user tries to navigate to any page that has page redirects to it, it is not redirecting properly bcz of user selectors present in the url

 

 

Thanks

Krishna

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 31, 2023
kautuk_sahni
Community Manager
Community Manager
November 1, 2023

@krishna_sai Did you find the suggestions from Arun helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni