Hi All,
We have a page where we have configured the alias name but page is not redirecting with alias name.
We are using AEM 6.4.5 version
Ex: page1 has configured alias name as page1-alias
when we hit the page with /page1.html it should redirect to /page1-alias.html but its not working.
We tried clearing the dispatcher cache and provided the root level access to anonymous user as well but still not working.
But when we direct hit the alias page is working(/page1-alias.html)
Could you please let us know whether can redirect a page to a page with alias name.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @gayatrik8153299 ,
If your goal is redirection from /page1.html to /page1-alias.html, then you should use the Rewrite Rule directive:
RewriteRule /page1.html /page1-alias.html [R=301,L] - for 301 redirect (the path shown in browser will be /page1-alias.html) or
RewriteRule /page1.html /page1-alias.html [PT] (the path shown in browser will be /page1.html)
https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule
https://httpd.apache.org/docs/2.4/rewrite/flags.html
The alias in the "Page Properties > Advanced" makes the page accessible via the different name. For instance if the alias for the page /content/we-retail/language-masters/en/experience/skitouring.html is set to "skitouring-alias", then the page will accessible via the /content/we-retail/language-masters/en/experience/skitouring-alias.html url as well, so the behavior you've described appears to be expected.
Regards
Hello @gayatrik8153299 ,
If your goal is redirection from /page1.html to /page1-alias.html, then you should use the Rewrite Rule directive:
RewriteRule /page1.html /page1-alias.html [R=301,L] - for 301 redirect (the path shown in browser will be /page1-alias.html) or
RewriteRule /page1.html /page1-alias.html [PT] (the path shown in browser will be /page1.html)
https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule
https://httpd.apache.org/docs/2.4/rewrite/flags.html
The alias in the "Page Properties > Advanced" makes the page accessible via the different name. For instance if the alias for the page /content/we-retail/language-masters/en/experience/skitouring.html is set to "skitouring-alias", then the page will accessible via the /content/we-retail/language-masters/en/experience/skitouring-alias.html url as well, so the behavior you've described appears to be expected.
Regards
Views
Replies
Total Likes
Addition to Andrei_Dantsou
You can try using vanity URLs with redirect vanity url property to redirect user to different page. but check below post before using vanity urls
https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager
@gayatrik8153299
Try using etc mapping in publisher http://blog.magmalabs.io/2016/07/26/how-to-use-internal-redirects-in-aem.html.
Thanks,
Nikhil
Hi,
So you want that if you specify page1.html as target page, the alias value is used instead of the page name (if the alias is configured)? IIRC that's not default, but it should be doable using a custom rewriter.
hi @gayatrik8153299 small tip, usually we get these kind of issues with vanity conflicts. Please double check.
You can use this package to fetch all the vanity list on your instance. https://downloads.experiencecloud.adobe.com/content/software-distribution/en/pswelcome.html?packageP...