homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

IE causing server side trouble?
Help needed, referer incorrectly set

5+ Year Member

Msg#: 9909 posted 1:01 pm on Aug 30, 2005 (gmt 0)

I'm running a piece of my page (partners.mydomain.com) in an iframe on a partners site (www.partner.com). When the user clicks the iframe on the hosting server, they open a php script on my server (www.mydomain.com/redirect) that redirects to a third site (www.thirdparty.com). The redirecting script logs clicks to a database.

When I go through this process in firefox the page and referer shows up correctly: the page is the redirecting script (www.mydomain.com/redirect) and the referer is the "iframe-page" (partners.mydomain.com).

HOWEVER, when I do the same in Internet Explorer the referer shows up as NULL, which basically brakes the functionality in the thirdparty site. Does anyone know how I can repair IE's broken referer functionality? (Or am I doing something wrong...?)

BTW: I'm beginning to suspect that the problems lie within the partners.mydomain.com and www.mydomain.com cross-overs. May the problem be that IE does not store referers across (sub-)domains? If so, can I work around it or do I need to use the same domain on both scripts?



5+ Year Member

Msg#: 9909 posted 7:52 pm on Aug 30, 2005 (gmt 0)

Sorry to bump my own stuff, but it was nearly drowning and I'm desperate!


WebmasterWorld Senior Member encyclo us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 9909 posted 7:57 pm on Aug 30, 2005 (gmt 0)

I don't have a specific answer to your question, but you cannot reliably depend on HTTP_REFERER even being present - so if your application depends on a specific referrer, it will fail regularly for your users.

- many firewalls (such as the very popular Norton Internet Security suite) disable referrers altogether
- you can easily switch off referrers in browsers such as Firefox or Opera
- you can fake a referrer

You would be better using cookies or passing details within the URL.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 9909 posted 8:01 pm on Aug 30, 2005 (gmt 0)

it's quite common for the referrer to be null, as is commonly done by Norton, or faked, or just made up. Various security settings can, I believe, also turn it off. In general, I wouldn't depend upon it for anything.



5+ Year Member

Msg#: 9909 posted 8:19 pm on Aug 30, 2005 (gmt 0)

Well, I know that referer often is unavailable/erranous. But I do not control the third party site which needs the correct referer. I think there is a solution to this problem seeing as when people click my redirect script from my www.domain.com it works most of the time, but when they click a link to the same script from partners.domain.com through an iframe on www.otherdomain.com it does not work in IE. It works with Firefox, not IE. That's what's making me think it's possible to fix.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved