Thanks Trent,

You definately pointed my in the right location..

I now use

<!------------------------------------------------------------------
- If a referer is defined, remove query string and redirect to root
- of the calling directory
------------------------------------------------------------------>
<cfif len(cgi.http_referer)>
 <cfif cgi.server_software CONTAINS "apache">
  <cfheader name="location" value="#listFirst(cgi.http_referer, "?")#">
  <cfheader statuscode="302" statustext="Moved temporarily">
 <cfelse>
  <cflocation url="#listFirst(cgi.http_referer, "?")#" addtoken="no">
 </cfif>
<!------------------------------------------------------------------
- Otherwise take client to the root of the website
------------------------------------------------------------------>
<cfelse>
 <cfif cgi.server_software CONTAINS "apache">
  <cfheader name="location" value="/">
  <cfheader statuscode="302" statustext="Moved temporarily">
 <cfelse>
  <cflocation url="/" addtoken="no">
 </cfif>
</cfif>

Which i believe works fine...

Thanks

----- Original Message -----
From: "Trent Shepherd" <[EMAIL PROTECTED]>
To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 12:27 PM
Subject: [cfaussie] Re: Apache and cflocation?


> I think the header information is served differently by the apache server.
>
> I use this snippet to get around this problem.
>
> <!--- Set the correct forwarding header for the server --->
>  <cfif ListContainsNoCase(cgi.SERVER_SOFTWARE,"apache")>
> <!--- apache --->
>   <CFHEADER NAME="Refresh" VALUE="0;url=#attributes.url#">
> <cfelse>
> <!--- IIS --->
> <CFHEADER NAME="location" VALUE="#attributes.url#">
> </cfif>
>
> cheers
>
> trent
>
> ---------- Original Message ----------------------------------
> From: "Taco Fleur" <[EMAIL PROTECTED]>
> Reply-To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
> Date:  Tue, 18 Feb 2003 12:09:58 +1000
>
> >Anyone any idea why all of a sudden I receive messages like the one below
on my apache server while doing a redirect?
> >
> >TIA
> >
> >HTTP/1.1 302 Found Date: Tue, 18 Feb 2003 02:07:15 GMT Server:
Apache/1.3.27 (Win32) Location: http://www.xxx.com/forum/index.cfm
Keep-Alive: timeout=15, max=96 Connection: Keep-Alive Transfer-Encoding:
chunked Content-Type: text/html; charset=iso-8859-1 12e
> >Found
> >The document has moved here.
> >
> >
>
>---------------------------------------------------------------------------
-----
> >
> >Apache/1.3.27 Server at www.xxx.com Port 80
> >0
> >
> >
> >---
> >You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> >To unsubscribe send a blank email to
[EMAIL PROTECTED]
> >
> >MX Downunder AsiaPac DevCon - http://mxdu.com/
> >
> >
> >---
> >You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> >To unsubscribe send a blank email to
[EMAIL PROTECTED]
> >
> >MX Downunder AsiaPac DevCon - http://mxdu.com/
> >
>
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>



---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to