You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Wagar <ew...@yahoo.com> on 2003/01/13 20:55:07 UTC

[users@httpd] referrer is incorrect or not being read by Apache

I am trying to use a script,  albeit small, to determine where a user
is coming.

If the user is coming from the proper address, then the script will
direct the user to the appropriate page.  If not, then the user will
be directed to a different page.

Unfortunately, I am not able to see the appropriate page.  Either I am
missing something, or forgot to compile something in.  I am using
Solaris8 with Apache 1.3.27 as the server, and I am using IE6 as my
browser.

Any help on why Apache is not seeing the HTTP_REFERRER is very
appreciated.

Thanks
eric


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] referrer is incorrect or not being read by Apache

Posted by Eric Wagar <ew...@yahoo.com>.
On Mon, 2003-01-13 at 16:14, Eric Wagar wrote:
> On Mon, 2003-01-13 at 14:55, Eric Wagar wrote:
[ snip ]
> As for how IE is getting the refferer information to the script, I am
> unsure, as this wouild be the first encounter of referrals.  How do I
> check to make sure IE is passing referral information?

  Print out the $referer value in your script.  See what you get.
  Try with a different browser to see if you get the same result
  or not.  Try printing out the ENV array to see what is being
  set and not set.

The $referer value is not being set.  I know I can explicitly set the
variable through Apache, by doing a SetEnv HTTP_REFERER, but from my
limited knowledge, I believe SetEnv is the incorrect way to set it.

I looked at some mod_rewrite stuff also.  It looks as though mod_rewrite
is what I'd like.

The reason I think mod_rewrite is because I'd like all of my sites web
pages to included the http://server/webpage as the referer.

If anyone can point me into the correct direction of this idea let me
know.

Thanks
eric

RE: [users@httpd] referrer is incorrect or not being read by Apache

Posted by Lee Fellows <lf...@4lane.com>.
On Mon, 2003-01-13 at 16:14, Eric Wagar wrote:
> On Mon, 2003-01-13 at 14:55, Eric Wagar wrote:
[ snip ]
> As for how IE is getting the refferer information to the script, I am
> unsure, as this wouild be the first encounter of referrals.  How do I
> check to make sure IE is passing referral information?

  Print out the $referer value in your script.  See what you get.
  Try with a different browser to see if you get the same result
  or not.  Try printing out the ENV array to see what is being
  set and not set.
> 
> Thanks
> eric
-- 
Lee Fellows <lf...@4lane.com>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] referrer is incorrect or not being read by Apache

Posted by Eric Wagar <ew...@yahoo.com>.
On Mon, 2003-01-13 at 14:55, Eric Wagar wrote:
> I am trying to use a script,  albeit small, to determine where a user
> is coming.
> 
> If the user is coming from the proper address, then the script will
> direct the user to the appropriate page.  If not, then the user will
> be directed to a different page.
> 
> Unfortunately, I am not able to see the appropriate page.  Either I am
> missing something, or forgot to compile something in.  I am using
> Solaris8 with Apache 1.3.27 as the server, and I am using IE6 as my
> browser.
> 
> Any help on why Apache is not seeing the HTTP_REFERRER is very
> appreciated.

  Aside from the fact that relying upon HTTP_REFERRER is problematical,
  1) you mention a script, is this a cgi script?  what language is
     it written in?  Is the configuration correct for passing/reading
     HTTP variables for this script?

The script is a cgi script, perl.  The configuration is correct.  There
are actually only three variables:
$detect = "http://www.flyguylive.com/first.htm";
#$correct =
"http://www.flyguylive.com.com/cgi-bin/referrer/tddetect.cgi";
$correct = "http://www.flyguylive.com.com/second.htm";
$incorrect = "http://www.flyguylive.com/third.htm";
$referer = $ENV{'HTTP_REFERER'};
   if ($referer =~m#$detect#) {
   print "Location: $correct\n\n";
   } else { 
   print "Location: $incorrect\n\n";
   }

  2) How are you testing this?  You make mention of IE6.  How is IE6
     getting the referrer information to pass to your script?  Is it
     passing any referrer information to the script?

The way I am testing this is to click on the link in
http://www.flyguylive.com/first.htm
The link is to the
http://www.flyguylive.com.com/cgi-bin/referrer/tddetect.cgi
script.  As you can see above, the script then decides if the user is
coming from the correct page or not.

As for how IE is getting the refferer information to the script, I am
unsure, as this wouild be the first encounter of referrals.  How do I
check to make sure IE is passing referral information?

Thanks
eric

Re: [users@httpd] referrer is incorrect or not being read by Apache

Posted by Lee Fellows <lf...@4lane.com>.
On Mon, 2003-01-13 at 14:55, Eric Wagar wrote:
> I am trying to use a script,  albeit small, to determine where a user
> is coming.
> 
> If the user is coming from the proper address, then the script will
> direct the user to the appropriate page.  If not, then the user will
> be directed to a different page.
> 
> Unfortunately, I am not able to see the appropriate page.  Either I am
> missing something, or forgot to compile something in.  I am using
> Solaris8 with Apache 1.3.27 as the server, and I am using IE6 as my
> browser.
> 
> Any help on why Apache is not seeing the HTTP_REFERRER is very
> appreciated.

  Aside from the fact that relying upon HTTP_REFERRER is problematical,
  1) you mention a script, is this a cgi script?  what language is
     it written in?  Is the configuration correct for passing/reading
     HTTP variables for this script?

  2) How are you testing this?  You make mention of IE6.  How is IE6
     getting the referrer information to pass to your script?  Is it
     passing any referrer information to the script?

-- 
Lee Fellows <lf...@4lane.com>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org