Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

SSI for common navigation

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?
1 Solution
Hmm... what does $ENV{'HTTP_REFERER'} variable equal to?
georgiaAuthor Commented:
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.
How about $ENV{'REQUEST_URI '} ?
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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
This is a total workaround but what about passing the argument to the script.  Ex:

Then you just print out the variable $caller.

It's not the greatest but if your $ENV variables truly can't help...
georgiaAuthor Commented:
That got it!  Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now