[TYPO3] Restrict site/page loading based on HTTP_REFERER

Darko Jr. Gonzalez jkokino at gmail.com
Sat Nov 3 10:39:35 CET 2007


Heya

> I can use condition like this in TS setup:
> > [globalString = IENV:REMOTE_ADDR = 192.168.*]
> > all the site content and configuration here
> > [global]
>
> Since you probably cannot check referer directly in conditions, you will
> have to write your own function that checks it and returns true or
> false. The function will be called in the condition. See userFunc in the
> manual [1].


Hmmm there is this:
http://wiki.typo3.org/index.php/TSref/getText#getIndpEnv:.3Cvariable_name.3E
http://typo3.org/fileadmin/typo3api-4.0.0/d3/d3d/classt3lib__div.html#8de3416a12d356d9b2c0bf8ef12dfdfc

I have used TYPO3_REQUEST_URL before. For tipafriend like this:
lib.tipafriend = COA
lib.tipafriend {
    wrap =<a href="#" title="Send to a friend" onclick='window.open("
index.php?id=15|", "",
"width=620,height=600,left=100,top=100,scrollbars=auto,menubar=no,resizable=0");'><img
src="fileadmin/templates/images/tipafriend.gif" alt="Send to a friend"
border="0" width="17" height="17" class="tipafriend_title"></a>
    1 = TEXT
    1.value = &tipUrl=
    2 = TEXT
    2.data = getIndpEnv: TYPO3_REQUEST_URL
    2.rawUrlEncode = 1
}

Can I use something like this:
[globalString = getIndpEnv: HTTP_REFERER = http://TLD.com*]
...
...
[global]

If not - then whats the correct approach?
Thanks for looking

Regards,
Darko


More information about the TYPO3-english mailing list