|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi Everyone,
I'm trying to find a (free if possible) php script that will quickly and easily redirect any visitors from a list of domains (about 10 in total just now)? I've come across a lot that will do one domain or will block by IP but not one that will allow me to easily add in a number of domains to be checked against. Thanks for any help anyone can provide. ![]() |
|
#2
|
|||
|
|||
|
This can be done pretty easy. Do you want like a main page, where the redirection will take place?
|
|
#3
|
||||
|
||||
|
In PHP:
<?php if(strpos("http://bad_website.com" , $_SERVER[HTTP_REFERER])){ header("Location: http://where_to_go.com"); //copy this for as many domains as you need... ?> Regular html goes here, and name the page with a .php extension...
__________________
May the source be with you - obi_wonton |
|
#4
|
|||
|
|||
|
I've come to the conclusion that the easiest way would be to do it this way with an include at the start of the page and just repeat the code for the banded sites. We're not talking lots of sites just now so shouldn't be a big problem. I think I'll start work on a mysql solution when I've time and post it here when done.
Thanks for the help. |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > Multiple Referrer Redirection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|