Link to home
Start Free TrialLog in
Avatar of PhotoMan2000
PhotoMan2000

asked on

detecting user's url paths..

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
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

<cfif listfindnocase(cgi.script_name, 'members', '/')>
ASKER CERTIFIED SOLUTION
Avatar of jimmy282
jimmy282
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PhotoMan2000
PhotoMan2000

ASKER

Worked great.. I should have known that! Didn't see it in the cgi list CFDUMP I did for the CGI variables..