aplelois
asked on
referral
hello,
I have this code that when you type this
http://musicsite.com/cgi-bin/goto.cgi?http://google.com
http://musicsite.com/cgi-bin/goto.cgi?http://yahoo.com
it goes to the URL after the .cgi?
when I check the logs from urchin and see
all referrals, all (the domains) that have linked to
my site.. but I dont see the one from musicsite.com
is there anyway to leave that info?
like if I clicked on the link to go to musicsite.com
this is my code
#include <stdio.h>
int main()
{
printf("Location:%s\n\n", getenv("QUERY_STRING"));
exit(0);
}
if you dont understand what I mean please ask.
thanks
I have this code that when you type this
http://musicsite.com/cgi-bin/goto.cgi?http://google.com
http://musicsite.com/cgi-bin/goto.cgi?http://yahoo.com
it goes to the URL after the .cgi?
when I check the logs from urchin and see
all referrals, all (the domains) that have linked to
my site.. but I dont see the one from musicsite.com
is there anyway to leave that info?
like if I clicked on the link to go to musicsite.com
this is my code
#include <stdio.h>
int main()
{
printf("Location:%s\n\n", getenv("QUERY_STRING"));
exit(0);
}
if you dont understand what I mean please ask.
thanks
ASKER
HTTP_REFERRE has to be --> http://musicsite.com/cgi-bin/goto.cgi <--
so when I type 5 times this http://musicsite.com/cgi-bin/goto.cgi?http://yahoo.com
on IE then I go to referall I see 5 from goto.cgi
is that possible ?
so when I type 5 times this http://musicsite.com/cgi-bin/goto.cgi?http://yahoo.com
on IE then I go to referall I see 5 from goto.cgi
is that possible ?
Sorry, maybe I'm missing something - which is the part you want to actually see?
ASKER
ok
domain.com/goto.html
has this in it
<a href="/cgi-bin/goto.cgi?http://google.com"> Google</a>
<a href="/cgi-bin/goto.cgi?http://mymusicsite.com"> My Music Site</a>
so If I click on the (my music site) link it will go to http://mymusicsite.com
yeah, it working but when I check logs it says is coming from --> domain.com/goto.html
and I want to see coming from domain.com/cgi-bin/goto.cg i instead!
domain.com/goto.html
has this in it
<a href="/cgi-bin/goto.cgi?http://google.com">
<a href="/cgi-bin/goto.cgi?http://mymusicsite.com">
so If I click on the (my music site) link it will go to http://mymusicsite.com
yeah, it working but when I check logs it says is coming from --> domain.com/goto.html
and I want to see coming from domain.com/cgi-bin/goto.cg
And what is it that you get from
printf("Location:%s\n\n", getenv("HTTP_REFERRER"));
(sorry, but can't test it because I am lacking a HTTP server at the moment)
printf("Location:%s\n\n", getenv("HTTP_REFERRER"));
(sorry, but can't test it because I am lacking a HTTP server at the moment)
ASKER
I type on IE http://musicsite.com/cgi-bin/goto.cgi?http://yahoo.com
Not Found
The requested URL /cgi-bin/(null) was not found on this server.
Not Found
The requested URL /cgi-bin/(null) was not found on this server.
That is the output of the 'printf()' statement?
ASKER
yes
Location:(null)
Location:(null)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
same thing
Not Found
The requested URL /cgi-bin/(null) was not found on this server.
Not Found
The requested URL /cgi-bin/(null) was not found on this server.
Then it seems that the CGI script isn't there where it is supposed to be...
ASKER
how come this is working fine?
#include <stdio.h>
int main()
{
printf("Location:%s\n\n", getenv("QUERY_STRING"));
exit(0);
}
#include <stdio.h>
int main()
{
printf("Location:%s\n\n", getenv("QUERY_STRING"));
exit(0);
}
#include <stdio.h>
int main()
{
printf("Location:%s\n\n", getenv("HTTP_REFERRER"));
exit(0);
}