This happens in Netscape when you redirect the browser to the same url that
it is currently at (although this is supposed to be a server-side redirect,
so you'd think the browser wouldn't notice...). 

I've heard of people appending a random value to the end of the url to
prevent this, like so:

<cflocation url="#self#?fuseaction=#something#&#Rand()#">


laura

-----Original Message-----
From: Kevin Bridges [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 3:52 PM
To: Fusebox
Subject: Redirection Problem


I am experienceing strange behavior running Netscape 4.7 and using a url
file to do a redirect.  I run a query and if there are no records returned I
redirect them back to the default action of the module.  Everything works in
IE but both Netscape 6 and 4.7 end up giving a 302 error (apache) which
basically reads:

Found

The document has moved here.

Where "here" is a link that contains exactly where I wanted the user
redirected to.  You click on the link and everything works as intended.
Does anyone know why I am getting this error and how I could resolve it?

I have this case in the switch statement:

  <CFCASE VALUE="ShowAccount">
    <CFINCLUDE TEMPLATE="#request.Module.WebRoot#_qry/qry_FindAccount.cfm">
    <CFINCLUDE TEMPLATE="#request.Site.WebRoot#_url/url_redirect.cfm">
    <CFINCLUDE TEMPLATE="#request.Site.WebRoot#_dsp/dsp_Header.cfm">
    <CFINCLUDE TEMPLATE="#request.Module.WebRoot#_dsp/dsp_ShowAccount.cfm">
    <CFINCLUDE TEMPLATE="#request.Site.WebRoot#_dsp/dsp_Footer.cfm">
  </CFCASE>


If no records are returned from qry_FindAccount I set this variable inside
of a cfscript block that is run immediately after the query (in
qry_FindAccount):

        if(NOT IsDefined("client.redirect")) {
          client.redirect = "#request.Module.WebRoot#index.cfm";
        }

Then in my url_redirect.cfm I have the following:

<CFIF ISDEFINED("CLIENT.REDIRECT")>
        <CFSET redirect=CLIENT.redirect>
        <CFSET DeleteClientVariable("redirect")>
</CFIF>

<CFIF ISDEFINED("redirect")><CFLOCATION URL="#redirect#"
ADDTOKEN="Yes"></CFIF>

Thanks,

Kevin Bridges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to