redirect

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

redirect

Post 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>
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

redirect

Post 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.
John Turnbull
Thunderstone Software
Post Reply