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
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
<cfif listfindnocase(cgi.script_ name, 'members', '/')>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked great.. I should have known that! Didn't see it in the cgi list CFDUMP I did for the CGI variables..