<!--
	CDN buckets:

		- lenovo.com.102.112.2o7.net

			- s.lenovo.com

		- lnv.lithium.com

			- forum.lenovo.com
			- forums.lenovo.com

		- com-lenovo.netmng.com
		- tags.tiqcdn.com/utag/lenovo/


	Nonfunctional domains;

		- lenovo.com subdomains:

			- blog *
			- consumersupport **
			- news			(handshake fails)
			- social *
			- support **

		- training.lenovo.partner-management.com

	* Redirects to www.lenovoblogs.com; expired 2011-10-05, CN: localhost.localdomain
	** Times out


	Problematic domains:

		- lenovo.com			(cert is only valid for www)
		- forum.lenovo.com *
		- outlet.lenovo.com		($ 404s, some pages redirect to http, some paths work)
		- (www.)lenovovision.com **
		- (www.)thinkpad.com **

	* Mismatched, CN: secure01.lithium.com
	** Times out


	Partially covered domains:

		- (www.)lenovo.co.uk	(→ www.lenovo.com)
		- (www.)lenovo.com	(^ → www, some paths 404)
		- outlet.lenovo.com


	Fully covered domains:

		- lenovo.com subdomains:

			- checkout
			- download
			- forum		(→ forums)
			- forums
			- s
			- shop

		- (www.)lenovoorders.com
		- (www.)lenovovision.com	(→ www.lenovo.com)
		- (www.)thinkpad.com		(→ www.lenovo.com)

-->
<ruleset name="Lenovo (partial)" platform="mixedcontent">

	<target host="lenovo.co.uk" />
	<target host="www.lenovo.co.uk" />
	<target host="lenovo.com" />
	<target host="*.lenovo.com" />
		<!--
			https://mail1.eff.org/pipermail/https-everywhere-rules/2012-April/001098.html

			Redirects that 404. Destinations don't support https:
										-->
		<exclusion pattern="^http://www\.lenovo\.com/(?:support|training)/" />
		<!--
			https://trac.torproject.org/projects/tor/ticket/9056

			$ no longer works, some pages redirect to http:
									-->
		<exclusion pattern="^http://outlet\.lenovo\.com/(?!.+/images/|.+/js/|.+/seutil\.workflow:LoadCombinedResource|ISS_Static/|SEUILibrary/)" />
		<!--
			Redirects to http:
						-->
		<exclusion pattern="http://shop\.lenovo\.com/\w\w/\w\w/services-warranty(?:$|\?|/)" />
	<target host="lenovoorders.com" />
	<target host="www.lenovoorders.com" />
	<target host="lenovovision.com" />
	<target host="www.lenovovision.com" />
	<target host="thinkpad.com" />
	<target host="www.thinkpad.com" />


	<!--	Tracking cookies:
        These have been observed to break partner referral links and so are
        disabled...
	<securecookie host="^\.lenovo\.com$" name="^(?:exp_|oo_inv_|psp|s_|utag_)\w+$" />
	<securecookie host="^(?:.+\.)?lenovo\.com$" name=".+" />
					-->


	<rule from="^http://(?:www\.)?lenovo\.co\.uk/?$"
		to="https://www.lenovo.com/uk/en/" />

	<!--	https://trac.torproject.org/projects/tor/ticket/8715

		International domains fail to redirect properly:
									-->
	<rule from="^http://(?:www\.)?lenovo\.com(?::80)?/(?!us)(\w\w)/?(?:\?.*)?$"
		to="https://www.lenovo.com/$1/$1/" />

	<!--	404s as-is:
				-->
	<rule from="^http://(?:www\.)?lenovo\.com/depotstatus/?$"
		to="https://download.lenovo.com/lenovo/content/vru/depotstatus.html" />

	<!--	404s as-is:
				-->
	<rule from="^http://(?:www\.)?lenovo\.com/friendsandfamily/?$"
		to="https://shop.lenovo.com/SEUILibrary/controller/Lenovo:EnterStdAffinity?affinity=lenovofamily&amp;ConfigContext=StdAffinityPortal" />

	<!--	https://trac.torproject.org/projects/tor/ticket/6604

		thinkpad.com redirects to www.lenovo.com/link/redirect.www.lenovo.com/www.thinkpad.com/,
		which 404s over https but redirects like so over http:
									-->
	<rule from="^https?://(?:(?:www\.)?lenovo\.com/link/redirect\.www\.lenovo\.com/)?(?:www\.)?thinkpad\.com/(?:.*)"
		to="https://www.lenovo.com/us/en/?cid=SEO-thinkpadcom" />

	<rule from="^http://lenovo\.com/"
		to="https://www.lenovo.com/" />

	<!--	404s as-is:
				-->
	<rule from="^http:///shop\.lenovo\.com/us/?$"
		to="https://www.lenovo.com/products/us/desktop/essential/c-series" />

	<rule from="^http://(checkout|download|outlet|s|shop|www)\.lenovo\.com/"
		to="https://$1.lenovo.com/"/>
 
	<rule from="^http://forums?\.lenovo\.com/"
		to="https://forums.lenovo.com/" />

	<rule from="^http://(www\.)?lenovoorders\.com/"
		to="https://$1lenovoorders.com/" />

	<!--	https://mail1.eff.org/pipermail/https-everywhere-rules/2012-June/001189.html

		shop.lenovo points here:
						-->
	<rule from="^https?://(?:www\.)?lenovovision\.com/(?:.*)"
		to="https://www.lenovo.com/" />

	<!--	https://mail1.eff.org/pipermail/https-everywhere-rules/2012-April/001098.html

		training redirects to training.lenovo.partner-management.com:
										-->
	<rule from="^https://www\.lenovo\.com/training/"
		to="http://www.lenovo.com/training/" downgrade="1" />

	<!--	- Social just redirects to blog
		- Haven't seen blog nor support links, but just in case.
										-->
	<rule from="^https://(blog|(?:consumer)?support|news|social)\.lenovo\.com/"
		to="http://$1.lenovo.com/" downgrade="1" />

</ruleset>
