<!--
	For other Amazon coverage, see Amazon.xml.


	Amazon appears to operate in 7 countries, and does not hold the domains
	for some others, like .se or .be.  In other cases there is an http-only site
	that redirects to one of these 7 countries.


	amazon.*:

		Does work:

			- Everything except...

		Doesn't work:

			- gp/product/\w{10}
			- gp/search\?
			- lm/
			- /mn/search/
			- s/
			- s\?ie=
			- s\?rh=	(i.e. search pages and files)
				
-->
<ruleset name="Amazon EU" default_off="testing">

	<!--	Direct rewrites:
				-->
	<target host="amazon.co.uk" />
	<target host="aan.amazon.co.uk" />
	<target host="local.amazon.co.uk" />
	<target host="www.amazon.co.uk" />
	<target host="www1.amazon.co.uk" />

	<target host="amazon.de" />
	<target host="www.amazon.de" />
	<target host="amazon.es" />
	<target host="www.amazon.es" />
	<target host="amazon.fr" />
	<target host="www.amazon.fr" />
	<target host="amazon.it" />
	<target host="www.amazon.it" />

		<!--	Product pages redirect to http
										-->
		<!--exclusion pattern="^http://www\.amazon\.[\w.]+/(?:gp/product/\w{10}\?|gp/search\?|lm/|mn/search(?:$|\?)|s[?/])" /-->

		<exclusion pattern="^http://www\.amazon\.[\w.]+/+(?!$|\?|s(?:$|[?/]))" />


	<!--	Verified as working for UK, other sites matched appear to function identically.

		Unfortunately, navigating to an unsecured page wipes one's shopping basket :(
			This is problem with our handling of secure cookies, wherein we treat
		secure and non-secure cookies with the same ID as one cookie, instead of two.
			If our handling were correct, this securecookie rule would have only
		one problem, namely that basket information would be missing on search pages.

		Update: Amazon has intentionally broken tls support, for the most part.
												-->
	<!--securecookie host="^(www)?\.amazon\.(co\.uk|de|es|fr|it)$" name=".+" /-->
	<securecookie host="^local\.amazon\.co\.uk$" name=".+" />


	<rule from="^http:"
		to="https:" />

</ruleset>
