Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default url referer

    Hi,

    Is there anyway you can use coldfusion to get the full url of a webpage?

    #cgi.HTTP_REFERER# works but only if a link is actually clicked pointing to it .

    Hope you can help.

    Thanks
    Mattastic Guest

  2. Similar Questions and Discussions

    1. flash and cgi.referer
      I'm trying to create a flash anti-leech method, whereby my flash movie calls a ..cfm module that compares the cgi.host and cgi.referer variables. ...
    2. Help with HTTP.REFERER or something like it
      I have a main web site and many sub web sites under the main web site. You don't have to be logged in to access the main web site but you do have to...
    3. Page referer not getting set
      Hi All, I do web design for some small organizations, and one of the sites I have set up takes online conference registrations. Now, most of the...
    4. Ma Referer length
      All, I have a question about the Max Referer length. By default this is 256 I am not fully sure I understand this property. It this a header that...
    5. detecting referer
      Hello, Bit of a newbie question I guess. What is the best way, using php, to detect information about the referrer to a page. Is this...
  3. #2

    Default Re: url referer

    CGI.HTTP_HOST and CGI.PATH_INFO may give you what you want. Try using this:
    <CFSET website = CGI.HTTP_HOST & CGI.PATH_INFO>
    jdeline Guest

  4. #3

    Default Re: url referer

    Nothing about referer. Just to say I'm jealous about [url]http://www.deline.com[/url]
    There.
    BKBK Guest

  5. #4

    Default Re: url referer

    <cfif CGI.HTTPS eq "On">
    <cfset currentURL = "https://">
    <cfelse>
    <cfset currentURL = "http://">
    </cfif>
    <cfset currentURL = currentURL & CGI.SCRIPT_NAME & CGI.PATH_INFO>
    <cfif CGI.QUERY_STRING neq "">
    <cfset currentURL = currentURL & "?" & CGI.QUERY_STRING>
    </cfif>

    <cfoutput>#currentURL#</cfoutput>

    Note: this code tested on Netscape Enterprise. Different web servers have
    different definitions of CGI.PATH_INFO and CGI.SCRIPT_NAME, mainly IIS.

    Here's the official spec definition of the CGI variables:
    [url]http://cgi-spec.golux.com/ncsa/env.html[/url]
    and another source:
    [url]http://search.cpan.org/src/LDS/CGI.pm-3.11/cgi_docs.html#environment[/url]

    For this URL:
    [url]https://www.mysite.com/dir1/dir2/MyPage.html/foo/bar?Test=Yes[/url]

    CGI.SCRIPT_NAME should be:
    /dir1/dir2/MyPage.html
    CGI.PATH_INFO should be:
    /foo/bar
    CGI.QUERY_STRING should be:
    Test=Yes

    Kronin555 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139