Redirection from XML response to external URL

Avatar

Avatar
Boost 1
Level 1
ariesyinn
Level 1

Like

1 like

Total Posts

33 posts

Correct reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile

Avatar
Boost 1
Level 1
ariesyinn
Level 1

Like

1 like

Total Posts

33 posts

Correct reply

0 solutions
Top badges earned
Boost 1
Validate 1
View profile
ariesyinn
Level 1

22-06-2021

Hi all,

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?

ariesyinn_0-1624350987344.png

 

This is xml file

ariesyinn_0-1624355513192.png

 

I used JavaScript redirection code, but, i doesn't redirect and appears as shown below.

ariesyinn_1-1624355637931.png

 

 

 

 

Thanks.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

594 likes

Total Posts

705 posts

Correct reply

208 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

594 likes

Total Posts

705 posts

Correct reply

208 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

22-06-2021

Hi @ariesyinn 

 

In your previous post I mentioned the same solution of adding the redirect at the dispatcher i.e. at your webserver end. Let's say end user is trying to access www.anything.com/whateverxmlpath.xml and I want them to redirect to https://www.anywhereyouwant.com then the below rules will work.

 

RewriteCond %{REQUEST_URI} ^/whatverxmlpath.xml$
RewriteRule (.*) https://www.anywhereyouwant.com [R=301,L]

 

What is your request URL? Please provide the exact request URL that end user will be accessing and where you want the user to redirect i.e. the destination URL. I can provide the exact rule that you need to put on dispatcher and it will resolve the redirection issue.

 

Thanks! 

Answers (0)