<!--
	Wikipedia and other Wikimedia Foundation wikis previously had no real HTTPS support, and
	URLs had to be rewritten to https://secure.wikimedia.org/$wikitype/$language/ . This is no
	longer the case, see https://blog.wikimedia.org/2011/10/03/native-https-support-enabled-for-all-wikimedia-foundation-wikis/ ,
	so this file is a lot simpler these days.

-->
<ruleset name="Wikimedia">

	<target host="enwp.org" />
	<target host="frwp.org" />
	<target host="mediawiki.org" />
	<target host="www.mediawiki.org" />
	<target host="wikibooks.org" />
	<target host="*.wikibooks.org" />
	<target host="wikidata.org" />
	<target host="*.wikidata.org" />
	<target host="wikimedia.org" />
	<target host="*.wikimedia.org" />
		<exclusion pattern="^http://(?:apt|brewster|bug-attachment|cs|cz|dataset2|download|dumps|ekrem|emery|search|status|sitemap|torrus|ubuntu|wiki-mail)\.wikimedia\.org" />
		<!-- https://mail1.eff.org/pipermail/https-everywhere-rules/2012-June/001189.html -->
		<exclusion pattern="^http://lists\.wikimedia\.org/pipermail(?:$|/)" />
	<target host="wikimediafoundation.org" />
	<target host="www.wikimediafoundation.org" />
	<target host="wikinews.org" />
	<target host="*.wikinews.org" />
	<target host="wikipedia.org" />
	<target host="*.wikipedia.org" />
		<exclusion pattern="^http://(?:download|static)\.wikipedia\.org/" />
	<target host="*.m.wikipedia.org" />
	<target host="wikiquote.org" />
	<target host="*.wikiquote.org" />
	<target host="wikisource.org" />
	<target host="*.wikisource.org" />
	<target host="wikiversity.org" />
	<target host="*.wikiversity.org" />
	<target host="wikivoyage.org" />
	<target host="*.wikivoyage.org" />
	<target host="wiktionary.org" />
	<target host="*.wiktionary.org" />

	<securecookie host="^.+\.wikipedia\.org$" name=".+" />

	<rule from="^http://(en|fr)wp\.org/"
		to="https://$1.wikipedia.org/wiki/" />

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

	<rule from="^http://([^@:/]+\.)?wik(ibooks|idata|imedia|inews|ipedia|iquote|isource|iversity|ivoyage|tionary)\.org/"
		to="https://$1wik$2.org/" />

	<rule from="^http://([^@:/]+)\.planet\.wikimedia\.org/"
		to="https://$1.planet.wikimedia.org/" />

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

</ruleset>
