Page 1 of 1

redirect

Posted: Fri Jun 22, 2001 6:15 pm
by sourceuno
I have a redirect function in my script that redirects the user to another page after doing a fetch to make sure that page exists. My problem is that fetch returns an error which causes an error when reading the location header. Is there any way to suppress the fetch error so that I can write out the location header? Here's my code:

<A NAME=redirect PUBLIC>
<fetch $myurl>
<if $ret ne "">
<header NAME="Location" VALUE=$myurl>
<exit>
<else>
Page not found!
</if>
</A>

redirect

Posted: Fri Jun 22, 2001 6:58 pm
by John
You can write your own <putmsg> function to capture the errors. You can also use <vxcp putmsg> to control putmsg for that call.