I have pages in html and cgi.
Since I want to use add.cgi only from html pages, I made this.
But this does not work. Please someone guide me to correct this.
if ($ENV{HTTP_REFERER} =~ /^\/cgi-bin/i)
{
print "Location: /error.html\n\n";
exit;
}
else
{
.......
ex.
/public_html/home.html should be ok, but /cgi-bin/home.cgi needs to go to error.html, but it does not work. instead of going to error.html, it goes through the add.cgi.
Since I want to use add.cgi only from html pages, I made this.
But this does not work. Please someone guide me to correct this.
if ($ENV{HTTP_REFERER} =~ /^\/cgi-bin/i)
{
print "Location: /error.html\n\n";
exit;
}
else
{
.......
ex.
/public_html/home.html should be ok, but /cgi-bin/home.cgi needs to go to error.html, but it does not work. instead of going to error.html, it goes through the add.cgi.