Forum Moderators: phranque
I need to deliver customised content based on the users location. I already have the [ip-to-country.webhosting.info...] database and have a working solution in php, however I want to switch over to a solution using mod_rewrite and cookies, my plan is that with mod_rewrite and .htaccess on the relevant folders;
check for location cookie >
if location cookie exists rewrite url based on cookie value
otherwise >
match user IP against table >
rewrite url based on ip/location
each time the user arrives at a customised page the location cookie is set using javascript.
my questions are, can I do this?
and if I can how practical is it? the IP-country database is obviously large and I'm worried that it might too much for RewriteMap although the alternative is using Php which would cause a higher load.