Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Capture full URL with CF CGI variable

Participant ,
Dec 02, 2008 Dec 02, 2008
I need to capture an entire URL and send it in the body of an email, using CFMAIL. I'm looking at my CGI variables using CFDUMP, but can't seem to get the entire URL string, including the http:// or https://. Help?
6.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 02, 2008 Dec 02, 2008
Hi,

Try the "getCurrentURL" UDF!!

http://cflib.org/udf/getCurrentURL
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2008 Dec 02, 2008
<cfoutput>http<cfif cgi.https is "on">s</cfif>://#cgi.server_name &
cgi.script_name#<cfif
len(trim(cgi.query_string))>?#cgi.query_string#</cfif></cfoutput>

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 02, 2008 Dec 02, 2008
Daverms, this UDF worked perfectly.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 02, 2008 Dec 02, 2008
Azadi - your method worked excellently, too! Thanks to both of you!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2013 Aug 03, 2013

Both methods worked for me to on CFML8 setup.  However, I need the #bookmark value and both attempts above do no include the bookmark  information.  Does anybody have a clue on how to preserve bookmark information from the URL line?  Thanks in advance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2013 Aug 03, 2013
LATEST

That part of the URL is intended for the browser, and is not relevant to the server so is not transmitted with the request, so it never gets to the web server, let alone the CF server.

If you need that info, you're gonna need to send it some other way.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources