Solved

detecting user's url paths..

Posted on 2008-10-29
3
332 Views
Last Modified: 2013-12-24
I have a site with a global header with navigation tabs.  In a portion of the site I have a members only section.  I want to be able to use an alternate tab while the url path is with in a particular section ONLY.

For example these would get  the special header:
www.foo.com/members/index.cfm
www.foo.com/members/upgrade/index.cfm

Thes would not:
ww.foo.com/index.cfm
www.foo.com/public/index.cfm

I thought id use a cfif in my header file to detect the path the user is on.  Using #cgi.script_name# or #cgi.http_referer#.
Maybe like this:
<cfif #cgi.script_name#  EQ /members/>
show this header image
<cfelse>
show regular header image
</cfif>

But I wanted something more like intelligent like
<cfif #cgi.script_name#  EQ /members/*.cfm>

It's flawed, as it can't determine what each page would be as I add new ones. Help! Need this ASAP ...

Thanks,
PM
0
Comment
Question by:PhotoMan2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Expert Comment

by:azadisaryev
ID: 22833772
<cfif listfindnocase(cgi.script_name, 'members', '/')>
0
 
LVL 11

Accepted Solution

by:
jimmy282 earned 500 total points
ID: 22839508
or

<cfif cgi.path_info contains "/members/">

0
 

Author Closing Comment

by:PhotoMan2000
ID: 31511268
Worked great.. I should have known that! Didn't see it in the cgi list CFDUMP I did for the CGI variables..
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question