Both throw a 302 code on my server. Maybe it would help to turn off HTTP Status Codes in the cf administrator? Or, perhaps your frontend web server is having some play in this situation. Joe Gooch K12 Systems, Inc. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Joseph Gooch [ip] => mrwizard@k12sys [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> How can I set HTTP Status code 301 on redirecting toanother coldfusion page - Coldfusion - Advanced Techniques

How can I set HTTP Status code 301 on redirecting toanother coldfusion page - Coldfusion - Advanced Techniques

I have an application that intercepts a 404 error and redirects to a new CF page. Currently, search engines and other robots only see the 404 error. I am currently using cflocation to set the url. Can anyone give me an idea how to redirect and send an HTTP status code of 301 for permanantly moved? I've tried setting the status using the CFHEADER tag above the CFLocation but than it never redirects and gets a true 404 error. Any help appreciated....

  1. #1

    Default How can I set HTTP Status code 301 on redirecting toanother coldfusion page

    I have an application that intercepts a 404 error and redirects to a new CF
    page. Currently, search engines and other robots only see the 404 error. I am
    currently using cflocation to set the url. Can anyone give me an idea how to
    redirect and send an HTTP status code of 301 for permanantly moved? I've tried
    setting the status using the CFHEADER tag above the CFLocation but than it
    never redirects and gets a true 404 error.

    Any help appreciated.

    JohnK1965 Guest

  2. #2

    Default Re: How can I set HTTP Status code 301 on redirecting to anothercoldfusion page

    JohnK1965 wrote:
    > I have an application that intercepts a 404 error and redirects to a new CF
    > page. Currently, search engines and other robots only see the 404 error. I am
    > currently using cflocation to set the url. Can anyone give me an idea how to
    > redirect and send an HTTP status code of 301 for permanantly moved? I've tried
    > setting the status using the CFHEADER tag above the CFLocation but than it
    > never redirects and gets a true 404 error.
    >
    > Any help appreciated.
    >
    As far as I can tell, these lines are equivalent:

    <cfsetting showdebugoutput="false" />
    <!--- Method 1 --->
    <cflocation url="drop_shadow.html" />
    <cfabort />
    <!--- Method 2 --->
    <cfheader name="Location" value="drop_shadow.html" />
    <cfheader statusCode="302" statusText="Found" />
    <cfabort />

    Both throw a 302 code on my server.

    Maybe it would help to turn off HTTP Status Codes in the cf
    administrator? Or, perhaps your frontend web server is having some play
    in this situation.

    Joe Gooch
    K12 Systems, Inc.
    Joseph Gooch Guest

  3. #3

    Default Re: How can I set HTTP Status code 301 on redirecting toanother coldfusion page

    I am looking for the same solution. When I try:

    <cfheader statusCode="301" statusText="Moved Permanently">
    <cfheader name="Location" value="#newURL#">

    it still returns a 302. Does anyone know a solution? Do you get the same
    response?

    James-Pr Guest

Similar Threads

  1. error HTTP Status : 500
    By dafmyns in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: June 3rd, 07:23 AM
  2. HTTP Status-Code=503 (Service Unavailable)
    By BuddyWork in forum ASP.NET Web Services
    Replies: 3
    Last Post: May 11th, 06:25 AM
  3. Redirecting HTTP request
    By arc in forum ASP.NET Web Services
    Replies: 3
    Last Post: February 2nd, 08:58 PM
  4. HTTP status 401
    By ALI-R in forum ASP.NET Web Services
    Replies: 3
    Last Post: January 21st, 01:57 AM
  5. #19113 [Com]: HTTP status 200 returned on HTTP CONNECT when mod_proxy not in use
    By arafuse at bcexplorers dot com in forum PHP Development
    Replies: 5
    Last Post: December 3rd, 09:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •