How to redirect browser within Vortex script?

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

How to redirect browser within Vortex script?

Post by Thunderstone »



Hi -

I'm having trouble sending a "Location: ..." header from within
a Vortex script.

I've tried using fetch and sending the return value, but that really
isn't what I want. I'd like to actually send a Location: header to the
browser and redirect them to a new page.

Any suggestions are appreciated, and thanks in advance.

-Novo (novo@star-telegram.com)



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

How to redirect browser within Vortex script?

Post by Thunderstone »




Use the .bin extension in the URL to invoke Vortex, after the
function name. This indicates that you will print your own HTTP
headers instead of letting Vortex do it for you. Eg. a function like this:

<A NAME=redir>
Location: http://some.other.site.com/mypage.html
Content-Type: text/html

Please see <A HREF="http://some.other.site.com/mypage.html">this</A>.
</A>

will redirect the user, if Vortex is invoked as $url/redir.bin. See
http://www.thunderstone.com/vortexman/node18.html for more info. Note
that you are responsible for properly printing _all_ headers if .bin
is used; otherwise a Server Error may result if incorrect output is sent.

-Kai


Post Reply