Url Shortening not working in AEM 6.4 dispatcher(Prod Server) | Community
Skip to main content
farahz913310
Level 2
March 20, 2019
Solved

Url Shortening not working in AEM 6.4 dispatcher(Prod Server)

  • March 20, 2019
  • 13 replies
  • 9972 views

Hi All,

I have  implemented  url shortening using Sling Mapping  in AEM 6.4.It works fine on  my dev author & publisher but  on production environment ,url doesnt get shortened in dispatcher.

Also  currently Link Transformer  Config in publisher  has  link  rewriting as disabled, will it the reason ,please confirm

Has anyone faced the same issue.

Thanks in advance.

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 Gaurav-Behl

For links in the body, enable Link Transformer Rewriter and test

For links in the browser's address bar, fix the rewrite rules in both apache and AEM:

1) Could you test the absolute link with 'map' feature under /system/console/jcrresolver and share the results from both prod and non-prod publish servers? -    e.g. https://www.domain.com/content/jca/en/page1.html

2) To shorten root url - http://www.domain.com/content/jca/page1.html to http://www.domain.com, implement a redirect rule in apache before pass through

RedirectMatch 301 (?i)^/(content/jca/page1.html)$ /         # This would only work for one use case only

13 replies

Gaurav-Behl
Level 10
March 20, 2019

Probably you have a valid use case for using two domains for the same content tree but that's a separate topic.

The urls are not shortened for root page or children pages?

I see two entries here for domain mapping, what about the other rule for children pages of '/content/jca'. There must be another entry in  jcrresolver or otherwise in apache redirects.

This rule would take care of shortening children pages-

^http/abc.domain.com.80/delta/(.+)$/content/jca/$1
/$1
nternal
farahz913310
Level 2
March 20, 2019

Yes ,I do have this too .

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
March 21, 2019

For links in the body, enable Link Transformer Rewriter and test

For links in the browser's address bar, fix the rewrite rules in both apache and AEM:

1) Could you test the absolute link with 'map' feature under /system/console/jcrresolver and share the results from both prod and non-prod publish servers? -    e.g. https://www.domain.com/content/jca/en/page1.html

2) To shorten root url - http://www.domain.com/content/jca/page1.html to http://www.domain.com, implement a redirect rule in apache before pass through

RedirectMatch 301 (?i)^/(content/jca/page1.html)$ /         # This would only work for one use case only