Display a new web page on the website that initiated a handleSpecialURL request

Hi all,

In a response from a handleSpecialURL, I need to display a web page on the website that initiated the request. There is a more elegant solution than returning a meta “refresh” tag with the new web page? (the new web page is already hosted on the website, I can’t return all the new page web HTML code)

Thank you

Olivier

can you descibe a bit more, what you’re doing?

What is the purpose, what does the HandleSpecialUrl compute?

When handleSpecialURL receives a request, it can return HTML code:
https://documentation.xojo.com/index.php/WebRequest.Print

Instead of returning HTML code, I would like to send a URL back to the browser, so that it displays this page/URL.

Currently, I use a meta tag in webRequest.Print:

request.Print("<meta http-equiv='refresh' content='2; URL="https://mysite/mypage.html"'>"+EndOfLine)

but I would like a better solution.

I’m going to try showUrl.

I dont know if showURL works, but using a simple redirect over JS could be a good solution.

Otherwise it think that there’s no other solution.

Am I right, your webapp is a redirect portal, so if someone goes to your webapp under a special_url then the webapp redirects the user to another webpage?!

Set the Location header to the url and set the response code to 301.

Great, thank you Greg!

It is only to send back thank you pages, forms, etc., following a payment or a subscription for example.