I am facing issue in AEM SPA. This issue is on home page, there are 2 calls like below
This issue occurs on publisher, whereas on dispatcher the page comes blank. Can someone please help to resolve this issue.
Note :
1. Rest other pages are loading fine.
2. On dispatcher I have URL shortening rules and on publisher I am resource resolver config.
3. While testing I observe, that If I add some some character (dot or anything) on customheaderlibs.html, page work fine on both publisher & dispatcher.
4. I have overridden the HierarchyPageImpl to handle the URL shortening to give short path for all children element.
Solved! Go to Solution.
Views
Replies
Total Likes
Please check the etc/maps configuration here:
https://aemsimplifiedbynikhil.wordpress.com/2020/08/26/shortening-of-url-using-etc-map/
Thanks!
Hi @Gunjan_13
It should not make the 2nd call. Looks like something wrong with the URL shortening with the resource resolver map configuration. Can you please share the rules that you applied for URL shortening?
Thanks!
thanks for looking into.
I am using resource resolver factory config at publisher.
"resource.resolver.mapping": [
"/:/","/content/sample-project/en/:/","/content/sample-project/my/:/"
]
* failing at publisher already *
and then rewriting at dispatcher.
#Trim off the .html from URI
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^/(.*).html$ /$1 [R=301,L,QSA]
# Shorten the Tenant Path without extension
RewriteRule ^/content/${CONTENT_FOLDER_NAME}/en/([^.]*)$ /$1 [R=301,L]
# Add html to the URI before sending to publisher.
RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/bin
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/saml_login
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/system
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteCond %{REQUEST_URI} !(.json|.jpe?g|.png|.svg|.JPG|.mp4|.mov)$
RewriteRule ^(/.*)$ $1.html [L,PT]
May I know on publisher, instead of resource resolver can I use anything else ? I tried etc mapping but dint work for me. may be something wrong which I did there. can you please share any sample if any.
Please check the etc/maps configuration here:
https://aemsimplifiedbynikhil.wordpress.com/2020/08/26/shortening-of-url-using-etc-map/
Thanks!
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies