Redirection is not working in Dispatcher Environment | Community
Skip to main content
Level 2
November 19, 2024

Redirection is not working in Dispatcher Environment

  • November 19, 2024
  • 4 replies
  • 1113 views

In the dispatcher environment, when I open any page, it redirects to only one static page. For example:

http://test.domain/content/sample/page.html - works correctly.
However, the URL,  http://test.domain/page.html - does not work.

It seems like the /content/sample/ part of the URL is not being hidden correctly in the background. If I use the full path starting with /content, it works fine, but the shortened path does not.

How can I resolve this issue?

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

4 replies

Tethich
Community Advisor
Community Advisor
November 19, 2024

Hi @murali__d 

 

From what I understand you expect that:
1. http://test.domain/page.html to return the data.

2. http://test.domain/content/sample/page.html to be redirected to the shorter url.

 

For point 1, I would look and check in few places: your Sling Mappings ( they should be under /etc/map*), or your Dispatcher configs (rules and everything, including maybe even checking your docroot). If you can share your configs it would be easier for the community to check and provide you advice.

Couple of online resources abut how Sling Mappings work: https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html, https://blogs.taylor-made-software.co.uk/aem/101/build/apps/sling.html

 

For point 2 you could write a redirect rule in Dispacther to shorten the url and redirect you: https://blog.3sharecorp.com/shortening-urls-in-aem

Murali__DAuthor
Level 2
November 19, 2024


Hello @tethich , Thank you for your response

However, the URL, 
 http://test.domain/page.html working fine in publish environments but it does not work only dispatcher server. 

Tethich
Community Advisor
Community Advisor
November 19, 2024

I believe the things I pointed out are still applicable. Can you share dispatcher configs ? Have you checked in /etc/map if you have anything ? You can anonymize sensitive data.

A_H_M_Imrul
Community Advisor
Community Advisor
November 23, 2024

Hello @murali__d,

Most of this has already been addressed by @Tethich. However, could you clarify what you mean by http://test.domain/page.html working on the publish instance but not with the dispatcher?

 

It would be helpful if you could provide more details, especially the configuration for mapping the short path to the target node on the dispatcher before forwarding it to the publish server. Resolving the redirection issue first will allow us to focus on the link checker afterward.

 

Thank you!

Shashi_Mulugu
Community Advisor
Community Advisor
November 23, 2024

@murali__d Did you find the suggestions from users 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
Community Manager
Community Manager
November 25, 2024

@murali__d Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni