TDietsch wrote:I am trying to redirect all users within a 50 mile radius of my city using GeoDirection. Do I need to list all of the location codes within that radius to accomplish this or is there a more efficient way?
ok - there are two ways to do this, depending on whether you want to send each city within the specified radius to their own custom page or to a common page for all of the cities within the defined area.
This script uses the -r parameter to direct all visitors from within a 80 kilometer radius of USOHTOLE to a target page called MyPage.html after 5 seconds.
- Code: Select all
<script language="Javascript"
src="http://gd.geobytes.com/gd?pages=USOHTOLE -r 80&targetpage=MyPage&ext=html&after=5">
</script>
From what I currently understand of your requirements, it is probably what you are looking for. However there is another way to use this 'radius' facility, and that is "without specifying a target page" as we did in the above example.
If you omit the target page parameter from the above example, then GeoDirection will redirect each city's traffic to its own page - you would need a landing page for each city with in the radius - as the script will automatically redirect to the users 'city page'. (A city page being something like - USOHTOLE.html)
Like I said, this option - without the targetpage parameter is most likely not what you are looking for as you would still need to look up all of the location codes for all of the surrounding cities - and worse still create pages for each city. However, while this might seem like a complete waste of time, it is very handy when the server is dynamically creating the pages on the fly - the URI part of the URL tells the server which page to create, but again, it is probably not of much use when you are creating the pages manually.
Another option as you have indicated is to just include a coma separated list of all of the location codes and then redirect to a nominated page manually - as shown in this example:
http://www.geobytes.com/GeoDirection.ht ... tePageName
The advantage of this method, while more complex, is that you get more control.
Please let me know if I can assist further.