amazon webstore redirect by continent/country

2 answers

I recently helped build an amazon webstore. I need to only display this store to the United States and redirect visitors from foreign countries as the pricing structure is completely different due to taxes, shipping, ect.

My initial thought was to create an .htaccess file

GeoIPEnable On GeoIPDBFile /path/to/GeoIP.dat  # Start Redirecting countries  # Canada RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^US$ RewriteRule ^(.*)$$1 [L] 

and than upload this to the amazon hosting account. In testing I cannot get the above example to work: what I expect to happen here is that since I am from the United States accessing this page I should be redirected to "" This however does not happen and I get a 500 error.

I am having an increasingly difficult time as Amazon documentation is often out dated, incomplete, or just extremely confusing and convoluted. Google search are not yielding much help either. If someone knows if this is possible to redirect an amazon webstore if the visitor is not from the United States this would really help.


All answers to this question, which has the identifier 10452399

The best answer:

Try changing your Rewrite code to this:

RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^US$ [NC] RewriteRule ^{REQUEST_URI} [L,R] 

If you still get 500 error then look into your error.log to see that the error log is for this request.

You should consider instead signing up for the various amazon associates countries accounts. Then, you should detect your visitors, and append the correct associates tag for the country they are derived from, via javascript. Since this is a bit confusing to explain, let me make a flowchart explaining.

enter image description here

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type is referenced as an interface from”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data