<!--
	Nonfunctional domains:

		- blog.twitter.com		(hosted on Blogger)
		- engineering.twitter.com	(hosted on Blogger; interrupted)
		- status.twitter.com
		- status.twitter.jp


	CDN buckets:

		- a1095.g.akamai.net/=/1095/134446/1d/platform.twitter.com/ | platform2.twitter.com.edgesuite.net

			- platform2.twitter.com

		- twitter-any.s3.amazonaws.com
		- twitter-blog.s3.amazonaws.com

		- d2rdfnizen5apl.cloudfront.net

			- s.twimg.com

		- ssl2.twitter.com.edgekey.net
		- twitter.github.com


	Problematic domains:

		- twimg.com subdomains:

			- a[12]		(mismatched, CN: gp1.wac.edgecastcdn.net)
			- a3 *
			- a4		(mismatched, CN: si0.twimg.com)
			- a5 *
			- s		(cloudfront)

		- twitter.com subdomains:

			- urls.api *
			- platform[0-3]		(403, akamai)
			- anywhere.platform *
			- widgets.platform	(mismatched, CN: si0.twimg.com)

	* akamai


	Fully covered domains:

		- (www.)t.co		(www → ^)

		- twimg.com subdomains:

			- a\d		(→ si0)
			- abs
			- ea
			- g
			- gu
			- hca
			- jp
			- ma
			- ma[0123]
			- o
			- p
			- pbs
			- r
			- s		(→ d2rdfnizen5apl.cloudfront.net)
			- si[0-5]
			- syndication
			- cdn.syndication
			- widgets

		- twitter.com subdomains:

			- (www.)
			- 201[012]
			- ads
			- analytics
			- api
			- cdn.api
			- urls.api	(→ cdn.api)
			- business
			- preview.cdn
			- preview-dev.cdn
			- preview-stage.cdn
			- de
			- dev
			- en
			- es
			- firefox
			- fr
			- it
			- ja
			- jp
			- m
			- media
			- mobile
			- music
			- oauth
			- p
			- platform
			- platform[0-3]		(→ platform)
			- anywhere.platform	(→ platform)
			- widgets.platform	(→ platform)
			- search
			- static
			- support
			- transparency
			- upload

-->
<ruleset name="Twitter">

	<target host="t.co" />
	<target host="*.t.co" />
	<target host="*.twimg.com" />
	<target host="twitter.com" />
	<target host="*.twitter.com" />


	<securecookie host="^\.t\.co$" name=".+" />
	<securecookie host="^(?:.*\.)?twitter\.com$" name=".+" />


	<rule from="^http://(?:www\.)?t\.co/"
		to="https://t.co/" />

	<rule from="^http://a\d\.twimg\.com/"
		to="https://si0.twimg.com/" />

	<rule from="^http://(abs|ea|gu?|hca|jp|ma\d?|o|p|pbs|r|si\d|(?:cdn\.)?syndication|widgets)\.twimg\.com/"
		to="https://$1.twimg.com/" />

	<rule from="^http://s\.twimg\.com/"
		to="https://d2rdfnizen5apl.cloudfront.net/" />

	<rule from="^http://((?:201\d|ads|analytics|(?:cdn\.)?api|business|preview(?:-dev|-stage)?\.cdn|de|dev|en|es|firefox|fr|it|ja|jp|m|media|mobile|music|oauth|p|platform|search|static|support|transparency|upload|www)\.)?twitter\.com/"
		to="https://$1twitter.com/" />

	<rule from="^http://urls\.api\.twitter\.com/"
		to="https://cdn.api.twitter.com/" />

	<rule from="^http://(?:blo|engineerin)g\.twitter\.com/favicon\.ico"
		to="https://www.blogger.com/favicon.ico"/>

	<rule from="^http://(?:anywhere\.|widgets\.)?platform\d?\.twitter\.com/"
		to="https://platform.twitter.com/" />

</ruleset>
