Forum Moderators: coopster & phranque

Message Too Old, No Replies

Excluding Domains Question

Find User's Domain?

         

peetm

1:00 pm on Nov 7, 2002 (gmt 0)

10+ Year Member



I want to exclude requests for pages on my site emanating from certain domains. Actually, I'd not like to refuse them the page - just tweak it for them a bit.

I’ve got SSI enabled (inc exec) and have tried (for one domain) using REMOTE_HOST – however, that sometimes yields REMOTE_ADDR, i.e. an IP address – so, I’d either need a way to resolve that to a textual name (for string matching) or find some other way to do this.

I know nothing about Perl or server-side scripting (although I’d like to: and Perl etc is enabled) and, as far as I can tell, I’m hosted on a Zeus web-server (Blueyonder.co.uk). Anyway, can someone suggest how I can do this please.

Thanks,

peetm

andreasfriedrich

7:18 am on Nov 22, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The environment variable REMOTE_HOST will contain the numeric ip address when the web server wasn´t able to resolve the address. Chances are that you won´t either.

Andreas

jomaxx

10:41 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it's a manageable list of domains, the WHOIS database can give you the IP ranges for them. If you want geographical targeting, look at GeoIP.