5

Would it be possible to create new front pages for different cities - IE a San Diego page, a Los Angeles page, etc. using the same domain? What would be the best way to do that?

3

The only trick is identifying the source of the traffic, using the paid-for GeoIP database from MaxMind will give you the granular detail you need for city-level identification.

Once you've got GeoIP configured, you would just make a CMS page to suit for each location, and have the server perform a rewrite to handle it.

Eg. For a homepage redirect for Manchester

  1. Create a CMS page called /manchester.html
  2. Add a rewrite rule to redirect homepage traffic to this new page.

    For Nginx

    if ($geoip_city ~* (Manchester)) {
      rewrite ^/$ /manchester.html last;
    }
    

    For Apache

    RewriteCond %{ENV:GEOIP_CITY} ^Manchester$  
    RewriteRule ^$ /manchester.html [L]
    
1

Sure. The homepage is just a CMS page, therefore you can create a second one. Then you need some way to distinguish between the customers. I don't know whether geoIP can do this for US, but with a commercial database I think this is possible.

So yo can just redirect the customers from one city to the one page and the others to another page. All others maybe just see the default homepage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.