Hi,
I had to shorten the URL from the dispatcher, which I succeeded, but I could not view the page content on the shortened URL, but when the URL wasn't shortened, I could view the content similar to Publisher.
Please guide me on how to make the page visible on Dispatcher with shorten URL.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @iamnjain
This issue was resolved by the react team they handled via some routing element. AEM inputs are not that much required. I am also not exactlty aware what changes were made by react team.
Hi @Ronnie09,
You will need to add appropriate rewrite rules on Apache level, as a complementary part for short urls.
Here is the example. There is following content structure:
/content
/spa-site
/en
/home
/faq
Given structure should be accessible under below short urls, without html extension:
/content/spa-site/en/home -> https://domain/en/home
/content/spa-site/en/home/faq -> https://domain/en/home/faq
For above following Apache rewrite rules are applicable
RewriteEngine On
# remove html extension
RewriteRule ^/en.html$ /en [R=301,L]
RewriteRule ^/en/(.+).html$ /en/$1 [R=301,L]
# redirect / to /en
RewriteRule ^/$ /en [R=301,L]
# spa root rewrite
RewriteRule ^/en$ /content/spa-site/en.html [PT,L]
# content rewrite
RewriteRule ^/en/(.+)$ /content/spa-site/en/$1.html [PT,L]
Hi @iamnjain
This issue was resolved by the react team they handled via some routing element. AEM inputs are not that much required. I am also not exactlty aware what changes were made by react team.
Any changes you did at AEM side?
Views
Likes
Replies