NYCPHP Meetup

NYPHP.org

[nycphp-talk] IIS: $_SERVER & referer

George Webb gw.nyphp at gwprogramming.com
Mon May 12 20:06:40 EDT 2003


Hi Emmanuel.

	It sounds like your server config is not showing you all
the useful variables, but I just wanted to make sure you already
checked the following general HTTP issue:

	Web pages only have "referers" when a previous document
hyperlinked to them.  If you just type the URL of your web page
into a web browser, there won't actually be a referer, because no 
other (previous) page referred to it.  In this case the referer
variable is either unset, blank, or perhaps just a hyphen (this
is what the Apache logs seem to use).

	For testing purposes, you can create a short HTML page
which just hyperlinks to your web (PHP or Perl) page.  Then, your
PHP or Perl script will show the URL of the short HTML page as
the "referer."

	So make sure your PHP/Perl page really does have a "referer" 
before you start blaming PHP or IIS for not showing it to you!


Best, George.

George Webb
gw.nyphp at gwprogramming.com



More information about the talk mailing list