Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
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.
Solucionado! Ir para a Solução.
Visualizações
respostas
Total de curtidas
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
Visualizações
respostas
Total de curtidas
Hi,
Can you check dispatcher and server config as well
https://www.aemquickstart.in/2019/01/url-shortening-in-aem.html
Visualizações
respostas
Total de curtidas
do you see it configured under '/system/console/jcrresolver ' ?
test it to make sure that it works fine
If it doesn't work on prod-publish server then you'd need to fix it
If it works fine on prod-publish server and not on dispatcher then apache redirects rules could be an issue
share the appropriate configs/use case/logs, as applicable
Visualizações
respostas
Total de curtidas
Yes Link Checker Transformer is needed to shorten your full pathfield links in html dom. But when you hit a short url urself it will work from domain by sling mapping.
Visualizações
respostas
Total de curtidas
Yes when i hit the shorten url ,it works . But all urls (links on Navigation etc) on dispatcher are not getting shortened by default .
Currently Link rewriting is disabled on publisher since in one of the other project ,it works even with disabling link rewriting
Visualizações
respostas
Total de curtidas
On jcrresolver ,i see my rules are added
In the access log ,i see the request is going for complete path .
Below are the rewrite rules ,I have in dispatcher config :
Use Case is to prevent exposing "/content/myapp/" from URLS for SEO purpose.
Visualizações
respostas
Total de curtidas
They might be using a custom Transformer implemented in other project. You can check that.
Visualizações
respostas
Total de curtidas
So you mean Sling Mapping only works if Link Rewriting is enabled?
Visualizações
respostas
Total de curtidas
How is '/content/myapp' related to '/content/jca'?
Why do you have two replacement domains defined for a single pattern? I assume you have a way to control which one should be applied on what environment? If not, then that is your problem. You could remove "uat1" and test in prod or remove "www" in uat environment and test.
Visualizações
respostas
Total de curtidas
Sling Mapping will work even if Rewriting is disabled in Transformer which is why ur short url is working when u hit in browser, but updating content full urls to short urls will not work in html source. For other project its working, reason might be they have a custom rewriter written in other project which implements TransformerFactory. So you need to update setting of other custom rewriter for new project.
Visualizações
respostas
Total de curtidas
I have '/content/jca' only .
I removed the uat1 from prod ,sling mapping still does not work. Both domains are for prod server only. But still even after removing uat1 , it didnt work.
URLs are still not shortened.
Also i see this error in publisher logs : Not sure if its related
Visualizações
respostas
Total de curtidas
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 |
Visualizações
respostas
Total de curtidas
Yes ,I do have this too .
Visualizações
respostas
Total de curtidas
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
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas