Hi All,
vanity in page properties works fine i.e https://www.test.com/abc redirects to https://www.test.com/en/samplepage.html
but to make it redirect to with using query parameter , do we have any custom solution to manage from page properties
how we can append parameter fname=aa&lname=bb from page properties itself to make author driven
i.e https://www.test.com/abc should redirect to https://www.test.com/en/samplepage.html?fname=aa&lname=bb or https://www.test.com/en/samplepage?fname=aa&lname=bb
Solved! Go to Solution.
Views
Replies
Total Likes
'sling:vanityPath' do not support query params. You can go with below workarounds in this case.
Hope it helps!!
Yeah, I think the 'sling:vanityPath' does not support query parameters. That's why you are not seeing those queryParams being appended.
Depending on your requirements, I think you could consider some of these approaches:
You can use JavaScript to read and append the parameters in the URL. The parameters can be taken from the DOM (if you expose the page properties as part of the DOM). You can refer to something like this: https://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript
You can use a Servlet Filter to modify the request and append the request parameters
Hope this helps
@EstebanBustamante - i found an article to use ACS common feature Redirect Manager
is this will be good option ? it says its cloud compatible
https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-manager/index.html
'sling:vanityPath' do not support query params. You can go with below workarounds in this case.
Hope it helps!!
Views
Likes
Replies