I have an exposed rest service in my application, and I am trying to handle a GET request, then based on it I have to redirect the user to another URL from the internet.
I have tried the server action "AddMetaHttpEquivTag" to force a HTML redirect like
<meta http-equiv="refresh" content="time; URL=new_url" />
but it didn't work.
Does anyone have an idea about how to solve this?
Hi Edgar,
You can add a header Location using AddHeader from HttpRequestHandler extension and then set the Status Code (using SetStatusCode also from HttpRequestHandler) to 308 for Permanently Moved or 307 for Temporarily Moved:
And then the SetStatusCode to 308:
Hope it helps.
Cheers,
João
Worked perfectly like a charm!
Thanks a lot, João.
Hi Joao, can you please attach a sample oml for the above solution if possible.
Thanks
Sandeep
In my case its not takes place any redirection. con you attach sample working oml please
Rajesh
Same. No redirection takes place. In this instance, does the client side code need to handle to handle the 308 and redirect to the Location address in the response header?