HTTP_REFERER problem

Ed plug at 0x1b.com
Mon Mar 9 00:44:36 MST 2015


Daniel,

Do the blocking in the web server, not PHP. You want to push this kind
of stuff as upstream in your system as you can get it - if you can
block them at your firewall, even better.
Look at the Access Control section, if you are using httpd 2.4:
https://httpd.apache.org/docs/2.4/howto/access.html

the section - Access control by arbitrary variables - looks to have
what you want with HTTP_REFERER -  like so:

<If "%{HTTP_REFERER} == 'Badland.org'">
    Require All Denied
</If>

that's just some quick cut & paste, but a good example of what httpd
2.4 might look like - ymmv

On Sun, Mar 8, 2015 at 7:45 PM, Daniel Stasinski
<daniel at genericinbox.com> wrote:
> That still requires me to change what I'm doing.  I just want to know why
> php's $_SERVER['HTTP_REFERER']  does not match what I see in Apache's
> access.log.
>
> Daniel
>
> On Sun, Mar 8, 2015 at 7:27 PM, JD Austin <jd at twingeckos.com> wrote:
>>
>> You could try something like this:
>> http://stackoverflow.com/questions/165975/determining-referer-in-php
>>
>> -- JD Austin
>> Voice: 480.269.4335 (480 2MY Geek)
>> jd at twingeckos.com
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss


More information about the PLUG-discuss mailing list