Solved

detecting user's url paths..

Posted on 2008-10-29
3
325 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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recipient address rejected: User unknown in virtual alias table 1 322
PHP Register global 21 106
Linux Hosting 16 77
Run a Radio Station (Streaming media) with web interface 10 51
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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