URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushop_cgi
Thread Number: 157
[ Go back to previous page ]

Original Message
"Illegal Referrer problem with domain!?!"

Posted by Matt [kacmatt@attbi.com] on at 06:55 AM
OK... here's the deal:

I am hosted on a unix box that utilizes apache. The site is constructed with PHP & HTML utilizing a MySQL database for dynamic data with the UShop cart.

The ushop.pl, miscellaneous settings are set to YES for validating from the site with the referrer page.

The problem is as follows. I am successfully able to add items to my cart and get to the point of viewing the cart when beginning the order process, so I am able to see the display_cart.html page.

The problem begins when I click continue on the display_cart.html page. It begins the execution of the ushop script, but then I get the illegal referrer page. Here's why: All the settings for the ushop.pl point to the domain (ie: http://www.whatever.com/cgi-bin) but I still get this error?

The hosting is setup like this. 3 domains, one primary and 2 subdomains:

--domain 1 (IP Address is the same for all 3)
|--domain 2
|--domain 3

So, what happens is this: you enter the domain as http://www.whatever.com

you add items, you start the order process
the browser shows:


then click continue and get the illegal referrer page. The browser shows the link as follows:


See the problem? Before mentioning this, I want you to know that I CURRENTLY have the ushop.pl script set as http://www.whatever.com/cgi-bin

I've also tried by IP address, and just http://whatever.com/cgi-bin AND https://secure14.prohosting.com/~a0015590/whatever.com/cgi-bin

No success... I still end up with the same issue? Is there something that can be done or am I just stuck? If tried NS 4.78, 4.79, 6, IE 5.0, 5.5 and 6. Still get the same issue!


Table of contents

Messages in this discussion
"I got it.... "
Posted by Matt [kacmatt@attbi.com] on at 07:04 AM
I got it.... there was one link in one html page referring to incorrect URL...


"RE: I got it...."
Posted by Joseph Pishgar [support@uburst.com] on at 01:35 PM
Hello Matt,

Great to hear! 99% of the time, an Illegal Referrer error is caused by a path or a URL being wrong somewhere. Glad you could catch it!

If you hit any more snags, let us know.

Joseph Pishgar
Microburst Technologies, Inc.

""Illegal Referrer problem with domain!?!""
Posted by Reuben Cowell [reubencowell@deepbluedevelopment.com] on at 11:35 AM
$referrer_string =~ s/www.//g;
$expected_referrer =~ s/www.//g;

Add this code to subrouting "validate_referral_page" under $referrer_string = $ENV{'HTTP_REFERER'}; in the ushop-lib.pl. If a user types http://whatever.com/ you should get an Illegal Referer.

For a second domain
$referrer_string =~ s/new-what-ever-domain/whatever/g;

"RE: Illegal Referrer problem with domain!?!"
Posted by Bill Weiner on at 06:44 AM
Yes, good tip. That would allow posts from domains accessed with the "www" or not, such as:


Good tip.