uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Illegal Referrer problem with domain!?!

Knowledge Base Lobby : uShop Support Conference : CGI Script Related Problems
Oct-23-17 08:17 PM EST
Original Message
Illegal Referrer problem with domain!?!
Author Matt on 01-16-2002 at 06:55 (EST)
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)
&pip;
&pip;--domain 2
&pip;--cgi-bin
&pip;--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:

http://www.whatever.com/cgi-bin/display_cart.html

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

http://whatever.com/cgi-bin/ushop.pl

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!

HELP!
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  I got it.... Matt, 2002-01-16 07:04:35 (1)
            RE: I got it.... Joseph Pishgar, 2002-01-16 13:35:35 (2)
  "Illegal Referrer problem with domain!?!" Reuben Cowell, 2002-03-31 11:35:33 (3)
            RE: Illegal Referrer problem with domain!?! Bill Weiner, 2002-04-01 06:44:09 (4)

Messages In This Discussion
         1. I got it....
        Author Matt on 01-16-2002 at 07:04 (EST)
I got it.... there was one link in one html page referring to incorrect URL...

Sorry
TABLE OF CONTENTS
                 2. RE: I got it....
                Author Joseph Pishgar on 01-16-2002 at 13:35 (EST)
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.

Regards,
Joseph Pishgar
Microburst Technologies, Inc.
www.uburst.com
TABLE OF CONTENTS
         3. "Illegal Referrer problem with domain!?!"
        Author Reuben Cowell on 03-31-2002 at 11:35 (EST)
$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;
TABLE OF CONTENTS
                 4. RE: Illegal Referrer problem with domain!?!
                Author Bill Weiner on 04-01-2002 at 06:44 (EST)
Yes, good tip. That would allow posts from domains accessed with the "www" or not, such as:

http://www.yourdomain.com
http://yourdomain.com

Good tip.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.