Sign in to Community
Sign in to view all badges
I have a xml page. Instead of showing xml response, I want to redirect to external page.
How can I do auto redirection in .xml file?
This is xml file
Hi @ariesyinn ,
The requirement is not clear. Do you have this as component in which you are showing XML response? Though, I will try to answer based on what I understood.
1. If the XML is coming via a component then you can simply create a Clientlib and write a jQuery on load event which can just redirect to another page. Add the Clientlib on your component HTML.
window.location.href = "http://www.w3schools.com";
2. You can also write a redirect on dispatcher using rules.
3. You can also create a page using with sling:resourceType=foundation/components/redirect and configure the properties-
Open page properties, and add the redirect url.
Hope it helps!