View Full Version : Justin, help...script error
flowersource
04-21-1999, 11:43 PM
Can you look at this piece of code,
#### An array of accepted referers domain names / IP#s ------------#
@referers = ('http://www.flowersource.net','http://flowersource.net');
and tell me why it is causing a "Bad Referrer" script error ?
Thanks,
Mike
hearts
04-22-1999, 12:56 AM
mikeeeeeeeee.... *hugs*
try leaving off the http:// portion of those... that should do the trick.
--------------
hearts
-----
Justin
04-22-1999, 05:40 AM
Actually, you should be able to leave off the www also, making it just flowersource.net - it should look in the referer URL for the string and if it's there, it should allow it. So if you just put an f in there, any referer with an f in the name would be allowed http://www.aota.net/ubb/smile.gif
What script is this code from? I had to do something similar for WWWThreads which I am installing on my new site. I have the .com, .net, and .org for the new domain, so instead of putting 6 different referers I just put the domain name without the tld http://www.aota.net/ubb/biggrin.gif
But Hearts is right - the http:// is not part of the domain reported in the http_referer environment variable...
------------------
Justin Nelson
FutureQuest Support
flowersource
04-22-1999, 12:31 PM
Nupe, that did not help. Actually, I had tried it without the http:// part. (It came that way in the script) when it did not work, I added the http://
Could an incorrect path or permission cause the 'bad referrer' error?
I don't think that I want to try it with just the 'f' there. It seems as if the purpose of the code is to protect the scripts from being called/manipulated by any other referrer, then the exact name needs to be there, right?
Mike
Justin
04-23-1999, 01:51 AM
Right you are - my point was that if you only put flowersource.net it would also accept from www.flowersource.net. If you just put flowersource, it would accept from flowersource.net, flowersource.com, or even worse, http://www.geocities.com/flowersource - anything with flowersource in it...
But the http:// part will never be in the referer (I'm pretty sure anyway http://www.aota.net/ubb/smile.gif) So it's best to leave that off.
As for the errors, I'm not sure - it sounds like the error is coming from the script, not the server - it's the script's own error message.
I don't see how a path/permissions problem would cause the script to think it's being linked from a URL other than flowersource... try just putting flowersource in the referers, just to see if it works - if so, then just keep making it more and more specific until you find the best thing to put in there (it honestly depends on the script but I'm sure it just looks for the word in the referer URL).
------------------
Justin Nelson
FutureQuest Support
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.