Solved

SSI for common navigation

Posted on 2000-03-05
6
211 Views
Last Modified: 2010-03-05
I have a SSI that includes a cgi that prints out a common navigation bar to all pages.  I wanted to add a little graphic that will display what section the SSI is being called from, but how can I tell?  There is no ENV variable for the calling page... of course SCRIPT_NAME displays the name of the cgi and not the SHTML page that included it.  Any way for me to tell within this CGI which page is calling it?
0
Comment
Question by:georgia
6 Comments
 
LVL 2

Expert Comment

by:sanek
ID: 2585971
Hmm... what does $ENV{'HTTP_REFERER'} variable equal to?
0
 

Author Comment

by:georgia
ID: 2586002
It is blank....  I assume it would refer to the page that I came from and not the one that called the script because it is blank when I just use the URL.
0
 

Accepted Solution

by:
powerlord earned 50 total points
ID: 2586297
How about $ENV{'REQUEST_URI '} ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:sanek
ID: 2587003
Wierd...
I see at SCRIPT_FILENAME calling page and not CGI address. How do you execute CGI
with <!--#exec cgi=...--> or <!--#include virtual=...-->
Try to use include, it's better
0
 
LVL 3

Expert Comment

by:guadalupe
ID: 2587421
This is a total workaround but what about passing the argument to the script.  Ex:

script.pl?caller=callinmg_page.htm

Then you just print out the variable $caller.

It's not the greatest but if your $ENV variables truly can't help...
0
 

Author Comment

by:georgia
ID: 2588048
That got it!  Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl search and replace 6 172
Expect & sshpass package for Solaris 10 x86 15 990
add a syntax to a csv file 8 99
quoting a comma separated list 20 90
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

685 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