<!--
	Other Stack Exchange rulesets:

		- Ask_Ubuntu.com.xml
		- MathOverflow.net.xml
		- Server_Fault.com.xml


	Nonfunctional domains:

		- chat.stackexchange.com	(mixed content)
		- meta.*.stackexchange.com      (mismatched, CN: *.stackexchange.com)


	Problematic domains:

		- www.stackapps.com *

	* Mismatched


	Fully covered domains:

		- cdn-chat.sstatic.com
        	- *.stackexchange.com


	Mixed content:

		- css on chat.stackexchange.com from cdn-chat.sstatic.net *

		- Images on chat.stackexchange.com, from:

			- www.gravatar.com *
			- i.stack.imgur.com *
			- cdn.sstatic.net *

		- Web bugs on *.stackexchange.com from pixel.quantserve.com *

	* Secured by us


	As of Dec., 2013, stackexchange has a cert valid for:

		- *.stackexchange.com
		- stackexchange.com
		- meta.stackexchange.com
		- *.meta.stackexchange.com
		- *.stackoverflow.com
		- stackoverflow.com
		- serverfault.com
		- stackauth.com
		- sstatic.net
		- meta.serverfault.com
		- superuser.com
		- meta.superuser.com
		- stackapps.com
		- openid.stackauth.com

-->
<ruleset name="Stack Exchange (partial)">

	<target host="blogoverflow.com" />
	<target host="www.blogoverflow.com" />
	<target host="sstatic.net" />
	<target host="*.sstatic.net" />
	<target host="stackapps.com" />
	<target host="www.stackapps.com" />
	<target host="stackexchange.com" />
	<target host="*.stackexchange.com" />
		<exclusion pattern="^http://(?:\w+\.)?stackexchange\.com/search\?" />
		<exclusion pattern="^http://chat\.stackexchange\.com/" />
        <exclusion pattern="^http://(?:\w+\.)?(stackexchange|stackoverflow)\.com/users/authenticate/" />
	<target host="stackoverflow.com" />
	<target host="*.stackoverflow.com" />
	<target host="app.stacktack.com" />
	<target host="superuser.com" />
	<target host="*.superuser.com" />


	<securecookie host="^\.sstatic\.net$" name=".+" />
	<securecookie host="\.stackexchange\.com$" name=".+" />


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

	<rule from="^http://(?:(or\.)?cdn\.)?sstatic\.net/"
		to="https://$1cdn.sstatic.net/" />

	<rule from="^http://cdn-chat\.sstatic\.net/"
		to="https://cdn-chat.sstatic.net/" />

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

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

	<rule from="^https://(\w+\.)?stackexchange\.com/search\?"
		to="http://$1stackexchange.com/search?"
	downgrade="1" />

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

	<rule from="^http://app\.stacktack\.com/"
		to="https://s3.amazonaws.com/stacktackapp/" />

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

</ruleset>
