Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get current URL?

Status
Not open for further replies.

olchik

Programmer
Jan 6, 2006
93
US
Hello,

does anybody know how can I get current URL?

Thank you
Olchik
 
I am sorry, I am not sure about index. COuld you please give me an example?

Thank a lot for your help!
Olchik
 
Ups, I am sorry..I ment syntax..not index. IT's Monday:)

Olchik
 
Try this:
Code:
<cfset currentURL = "#CGI.SERVER_NAME#" & "#CGI.PATH_INFO#">
<cfif currentURL CONTAINS "teacher_signup.cfm">
  HI
<cfelse>
  SOMETHIN ESLE
</cfif>

Use the & instead of the +, when using the +-sign CF tyhinks you're trying to add two strings together.

____________________________________
Just Imagine.
 
Thank you guys!

r937, it didn't work not because I didn't capture the URL right. I had other mistake. Thank you again for your valuable help!

Olchik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top