<!--
	National Institutes of Health

	For rules causing false/broken MCB, see NIH.gov-falsemixed.xml.

	For other US government coverage, see US-government.xml.


	Nonfunctional hosts in *nih.gov:

		- (www.)?braininitiative ⁵
		- cancergenome ⁵
		- (www.)?cc ⁵
		- cris.cc ⁵

		- (www.)?cit ***
		- barney2.cit	Redirects to http
		- search2.google.cit	Redirects to http
		- training.cit ⁵

		- public.csr ⁵
		- employees *
		- exporter *
		- federalreporter *
		- (www.)?fic ⁵
		- clinicalstudies.info *
		- intramural ⁵
		- itservicedesk ⁵
		- livertox *
		- ftp.ncbi *

		- cdp.nci ᵇ
		- cpfp.nci ***
		- ctd2-dashboard.nci ⁵
		- deainfo.nci *
		- discover.nci ⁵
		- emice.nci ⁵
		- cgci.nci ᵃ
		- ncicb.nci ᵃ
		- wikiutils.nci ⁵

		- neuroscienceblueprint ⁵
		- catalog.nhlbi
		- (www.)?niaid
		- data.nidb ⁵
		- www.niddk ⁵
		- www2.niddk ⁵

		- ehp.niehs ⁵
		- kids.niehs ⁵
		- ntpsearch.niehs ⁵
		- nihlibrary ⁵
		- nihroadmap	Shows another domain

		- www.nimh ***
		- patientinfo.ninds ***
		- www.ninds ⁵

		- americanindianhealth.nlm
		- asianamericanhealth.nlm *
		- chemm.nlm *
		- collections.nlm *
		- disasterlit.nlm *
		- dr2.nlm *
		- druginfo.nlm *
		- (www.)?dsld.nlm *
		- dtd.nlm	Shows another domain
		- gateway.nlm ⁵
		- geneed.nlm *
		- ghr.nlm ⁵
		- hpd.nlm *
		- hazmap.nlm *
		- healthhotlines.nlm *
		- jats.nlm	Shows another domain
		- www.kidsenvirohealth *
		- lexsrv3.nlm *
		- ftp.ncbi.nlm *
		- oculus.nlm *
		- pillbox.nlm *
		- pubmedhh.nlm *
		- remm.nlm *
		- toxmap.nlm *
		- toxmystery.nlm *
		- toxnet.nlm *
		- (www.)?toxtown.nlm *
		- webwiser.nlm *
		- wiser.nlm	401

		- od *
		- acd.od		(404; expired, CN secure.palladianpartners.com)
		- oeodm.od		Handshake fails
		- (www.)?ors.od ⁵
		- osp.od ᵇ
		- search.od *
		- www.od *

		- oppnet	Shows another domain
		- (www.)?pubmedcentral	Shows another domain
		- recovery	Refused
		- salud		Shows another domain
		- search	403
		- chem.sis *
		- chem2.sis *
		- stemcells *

	ᵃ Shows another domain
	ᵇ Shows default page
	⁵ Refused
	*** Interrupted
	** Reset
	* Times out


	Problematic hosts in *nih.gov:

		- ^ ¹
		- internet.csr ²
		- directorsblog ¹
		- edi ¹
		- health ¹
		- www.ncats ¹
		- ncbiinsights.ncbi ¹
		- pubmedcommonsblog.ncbi ¹
		- www.chtn.nci ᵈ
		- www.dtp.nci ¹
		- www.nhlbi ²
		- nia		400
		- niehs ¹
		- nlm ¹

		- circulatingnow.nlm ¹
		- communityhealthmaps.nlm ¹
		- infocus.nlm ¹
		- www.lhncbc.nlm ¹
		- www.sis,nlm ¹
		- skr3.nlm ²

		- olpa.od ᵀ
		- report ˣ
		- training ³

	ᵀ Blocks Tor users
	ᵈ Dropped, preemptable redirect
	¹ Mismatched
	² Mixed css
	³ Handshake fails, preemptable redirect
	ˣ Mixed iframe, see https://www.paulirish.com/2010/the-protocol-relative-url/


	Partially covered hosts in *nih.gov:

		- catalog.nhlbi ʰ

	ʰ Some pages redirect to htt


	These altnames don't exist:

		- www.calendar.nih.gov
		- www.public.era.nih.gov
		- lrp.nih.gov
		- www.oamp.od.nih.gov


	Insecure cookies are set for these hosts:

		- answers.nei.nih.gov
		- nichd.nih.gov
		- www.nichd.nih.gov
		- report.nih.gov


	Mixed content:

		- css, on:

			- internet.csr, www.nhlbi from $self *
			- edi, staffdirectory.nigms, lhncbc.nlm, skr3.nlm, outreach.ors from fonts.googleapis.com *
			- skr3.nlm from www.lhncbc.nlm.nih.gov *
			- www.nidcd from search.usa.gov *

		- Images, on:

			- internet.csr, www.nhlbi, www.nidcd, ntp.niehs, www.niehs, biobeat.nigms, loop.nigms, accessguidid.nlm, nexus.od, videocast, www from $self *
			- directorsblog from www.nih.gov *
			- ctd2.nci, target.nci from ocg.cancer.gov *
			- www.nihms from publicaccess.nih.gov *
			- loop.nigms from publications.nigms.nih.gov *
			- infocus.nlm from $self
			- blast.ncbi.nlm from www.ncbi.nlm.nih.gov *
			- skr.nlm from ii-public2.nlm.nih.gov *
			- skr3.nlm from www.lhncbc.nlm.nih.gov *
			- toxlearn.nlm from www.adobe.com *
			- wwwcf2.nlm from www.nlm.nih.gov *

		- favicons, on:

			- era, grants, www.jobs, hr.od from www.nih.gov *
			- trainingcenter from $self *

		- Bugs,

			- aidsinfo from b.scorecardresearch.com *
			- directorsblog from cdn.printfriendly.com *
			- www.nhlbi from nhlbi.122.2o7.net *
			- www.niehs from webtrends-sdc.niehs.nih.gov *
			- apps.nlm, apps2.nlm, wwwcf2.nlm from wtsdc.nlm.nih.gov *
			- researchfestival from s7.addthis.com *

	* Secured by us, see https://www.paulirish.com/2010/the-protocol-relative-url/

-->
<ruleset name="NIH.gov (partial)">

	<!--	Direct rewrites:
				-->
	<target host="aidsinfo.nih.gov" />
	<target host="calendar.nih.gov" />
	<target host="commonfund.nih.gov" />
	<!--target host="internet.csr.nih.gov" /-->
	<target host="science.education.nih.gov" />
	<target host="era.nih.gov" />
	<target host="commons.era.nih.gov" />
	<target host="public.era.nih.gov" />
	<target host="grants.nih.gov" />
	<target host="imagebank.nih.gov" />
	<target host="infosida.nih.gov" />
	<target host="intrahr.nih.gov" />
	<target host="irp.nih.gov" />
	<target host="itrusteauth.nih.gov" />
	<target host="jobs.nih.gov" />
	<target host="www.jobs.nih.gov" />
	<target host="list.nih.gov" />
	<target host="www.lrp.nih.gov" />
	<target host="temp.my.nih.gov" />
	<target host="myitsm.nih.gov" />
	<target host="ncats.nih.gov" />
	<target host="nccam.nih.gov" />
	<target host="www.nccam.nih.gov" />
	<target host="nccih.nih.gov" />
	<target host="www.nccih.nih.gov" />

	<target host="brd.nci.nih.gov" />
	<target host="cananolab.nci.nih.gov" />
	<target host="cancermodels.nci.nih.gov" />
	<target host="cbiit.nci.nih.gov" />
	<target host="ctd2.nci.nih.gov" />
	<target host="dccps.nci.nih.gov" />
	<target host="edm.nci.nih.gov" />
	<target host="gsspubssl.nci.nih.gov" />
	<target host="provocativequestions.nci.nih.gov" />
	<target host="target.nci.nih.gov" />
	<target host="wiki.nci.nih.gov" />

	<target host="ned.nih.gov" />
	<target host="nei.nih.gov" />

	<target host="answers.nei.nih.gov" />
	<target host="nationaleyegene.nei.nih.gov" />
	<target host="www.nei.nih.gov" />

	<target host="newsinhealth.nih.gov" />
	<target host="catalog.nhlbi.nih.gov" />
	<!--target host="www.nhlbi.nih.gov" /-->
	<target host="www.nia.nih.gov" />
	<target host="nichd.nih.gov" />
	<target host="www.nichd.nih.gov" />
	<target host="www.nidcd.nih.gov" />
	<target host="ddktoday.niddk.nih.gov" />
	<target host="livertox.niddk.nih.gov" />

	<target host="ntp.niehs.nih.gov" />
	<target host="webtrends-sdc.niehs.nih.gov" />
	<target host="www.niehs.nih.gov" />

	<target host="nigms.nih.gov" />

	<target host="biobeat.nigms.nih.gov" />
	<target host="loop.nigms.nih.gov" />
	<target host="publications.nigms.nih.gov" />
	<target host="staffdirectory.nigms.nih.gov" />
	<target host="www.nigms.nih.gov" />

	<target host="www.nihms.nih.gov" />
	<target host="nihrecord.nih.gov" />
	<target host="www.nimh.nih.gov" />

	<target host="accessgudid.nlm.nih.gov" />
	<target host="apps.nlm.nih.gov" />
	<target host="apps2.nlm.nih.gov" />
	<target host="archive.nlm.nih.gov" />
	<target host="dailymed.nlm.nih.gov" />
	<target host="disaster.nlm.nih.gov" />
	<target host="healthreach.nlm.nih.gov" />
	<target host="www.healthreach.nlm.nih.gov" />
	<target host="id.nlm.nih.gov" />
	<target host="ihm.nlm.nih.gov" />
	<target host="ii.nlm.nih.gov" />
	<target host="ii-public2.nlm.nih.gov" />
	<target host="indexcat.nlm.nih.gov" />
	<target host="lhncbc.nlm.nih.gov" />
	<target host="local-rximage.nlm.nih.gov" />
	<target host="local-www.nlm.nih.gov" />
	<target host="mbr.nlm.nih.gov" />
	<target host="metamap.nlm.nih.gov" />
	<target host="mmtx.nlm.nih.gov" />
	<target host="mor.nlm.nih.gov" />
	<target host="ncbi.nlm.nih.gov" />
	<target host="blast.ncbi.nlm.nih.gov" />
	<target host="pubchem.ncbi.nlm.nih.gov" />
	<target host="structure.ncbi.nlm.nih.gov" />
	<target host="www.ncbi.nlm.nih.gov" />
	<target host="profiles.nlm.nih.gov" />
	<target host="rximage.nlm.nih.gov" />
	<target host="rxnav.nlm.nih.gov" />
	<target host="sis.nlm.nih.gov" />
	<target host="skr.nlm.nih.gov" />
	<!--target host="skr3.nlm.nih.gov" /-->
	<target host="structuredabstracts.nlm.nih.gov" />
	<target host="toxlearn.nlm.nih.gov" />
	<target host="uts.nlm.nih.gov" />
	<target host="vsac.nlm.nih.gov" />
	<target host="wsd.nlm.nih.gov" />
	<target host="wtsdc.nlm.nih.gov" />
	<target host="www.nlm.nih.gov" />
	<target host="wwwcf.nlm.nih.gov" />
	<target host="wwwcf2.nlm.nih.gov" />

	<target host="ocio.nih.gov" />

	<target host="hr.od.nih.gov" />
	<target host="www.hr.od.nih.gov" />
	<target host="nexus.od.nih.gov" />
	<target host="nihpublications.od.nih.gov" />
	<target host="oamp.od.nih.gov" />
	<!--target host="olpa.od.nih.gov" />	needs clearnet testing	-->

	<target host="oir.nih.gov" />
	<target host="outreach.ors.nih.gov" />
	<target host="projectreporter.nih.gov" />
	<target host="publicaccess.nih.gov" />
	<!--target host="report.nih.gov" /-->
	<target host="researchfestival.nih.gov" />
	<target host="smartcard.nih.gov" />
	<target host="www.training.nih.gov" />
	<target host="trainingcenter.nih.gov" />
	<target host="www.trainingcenter.nih.gov" />
	<target host="videocast.nih.gov" />
	<target host="www.nih.gov" />

	<!--	Complications:
				-->
	<target host="nih.gov" />
	<target host="www.ncats.nih.gov" />
	<target host="www.chtn.nci.nih.gov" />
	<target host="www.dtp.nci.nih.gov" />
	<target host="nia.nih.gov" />
	<target host="niehs.nih.gov" />
	<target host="nlm.nih.gov" />
	<target host="www.lhncbc.nlm.nih.gov" />
	<target host="www.sis.nlm.nih.gov" />
	<target host="training.nih.gov" />

		<!--	Redirects to http:
						-->
		<!--exclusion pattern="^http://catalog\.nhlbi\.nih\.gov/catalog/home$" /-->
		<!--
			Exceptions:
					-->
		<exclusion pattern="^http://catalog\.nhlbi\.nih\.gov/(?!/*(?:catalog/a4j/s/|favicon\.ico|pubstatic/|static_includes/|webstatic/))" />

			<!--	+ve:
					-->
			<test url="http://catalog.nhlbi.nih.gov/catalog/facet/Diseases-and-Conditions/term/Anemia" />
			<test url="http://catalog.nhlbi.nih.gov/catalog/facet/Diseases-and-Conditions/term/Blood-Diseases" />
			<test url="http://catalog.nhlbi.nih.gov/catalog/facet/Diseases-and-Conditions/term/COPD" />
			<test url="http://catalog.nhlbi.nih.gov/catalog/facet/Diseases-and-Conditions/term/Heart-Attack" />
			<test url="http://catalog.nhlbi.nih.gov/catalog/facet/Diseases-and-Conditions/term/Peripheral-Artery-Disease" />
			<test url="http://catalog.nhlbi.nih.gov/catalog/home" />

			<!--	-ve:
					-->
			<test url="http://catalog.nhlbi.nih.gov/catalog/a4j/s/3_3_2.SR1org/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_.jsf" />
			<test url="http://catalog.nhlbi.nih.gov/favicon.ico" />
			<test url="http://catalog.nhlbi.nih.gov/pubstatic/12-3651/12-3651.gif" />
			<test url="http://catalog.nhlbi.nih.gov/static_includes/images/chat.gif" />
			<test url="http://catalog.nhlbi.nih.gov/webstatic/css/print.css" />
			<test url="http://catalog.nhlbi.nih.gov/webstatic/images/print-btn.gif" />

		<!--	Mixed css:
					-->
		<!--test url="http://www.nhlbi.nih.gov/health/health-topics/topics/hb" /-->


	<!--	Not secured by server:
					-->
	<!--securecookie host="^\.nih\.gov$" name="^(?:NIHMS_LOGIN_ATTEMPT|FLAG|NIHMS_ROUTE_CHOICE|NIHMS_SESSION|WEB_NIHMS_LANG|ncbi_sid|xid)$" /-->
	<!--securecookie host="^(?:aidsinfo|infosida|ned|(?:www\.)?nichd|nihpublications\.od|report)\.nih\.gov$" name="^ASP\.NET_SessionId$" /-->
	<!--securecookie host="^public\.era\.nih\.gov$" name="^JSESSIONID$" /-->
	<!--securecookie host="^healthreach\.nih\.gov$" name="^(?:ASP\.NET_SessionId$|BIGipServer)" /-->
	<!--securecookie host="^imagebank\.nih\.gov$" name="^(?:CFID|CFTOKEN)$" /-->
	<!--securecookie host="^(?:itrusteauth|ocio|smartcard)\.nih\.gov$" name="^asig_persistence$" /-->
	<!--securecookie host="^wiki\.nci\.nih\.gov$" name="^JSESSIONID$" /-->
	<!--securecookie host="^answers\.nei\.nih\.gov$" name="^TS[\da-f]+$" /-->
	<!--securecookie host="^webtrends-sdc\.niehs\.nih\.gov$" name="^ACOOKIE$" /-->
	<!--securecookie host="^\.nlm\.nih\.gov$" name="^WebEnv$" /-->
	<!--securecookie host="^(?:apps\.nlm|projectreporter)\.nih\.gov$" name="^(?:CFID|CFTOKEN|JSESSIONID)$" /-->
	<!--securecookie host="^dailymed\.nlm\.nih\.gov$" name="^(?:CFAUTHORIZATION_DAILYMED_[\dA-F]{32}|CFID|CFTOKEN|JSESSIONID)$" /-->
	<!--securecookie host="^id\.nlm\.nih\.gov$" name="^JSESSIONID$" /-->
	<!--securecookie host="^(?:local-)?rximage\.nlm\.nih\.gov$" name="^DocuWiki$" /-->
	<!--securecookie host="^oamp\.od\.nih\.gov$" name="^textsize$" /-->
	<!--securecookie host="^\.projectreporter\.nih\.gov$" name="^(?:REPORTERPORTFOLIO|RUPSID)$" /-->
	<!--securecookie host="^www\.training\.nih\.gov$" name="^(?:PHPSESSID|symp_cookie_check)$" /-->

	<securecookie host="^\." name="^s_vi" />
	<securecookie host="^(?!catalog\.nhlbi\.)\w" name="." />


	<rule from="^http://((?:nia|niehs|nlm|training)\.)?nih\.gov/"
		to="https://www.$1nih.gov/" />

	<rule from="^http://www\.(ncats|lhncbc\.nlm|sis\.nlm)\.nih\.gov/"
		to="https://$1.nih.gov/" />

	<!--	Redirect keeps path and args,
		but not forward slash:
					-->
	<rule from="^http://www\.chtn\.nci\.nih\.gov/+"
		to="https://www.chtn.org/" />

		<test url="http://www.chtn.nci.nih.gov/index.htm" />

	<!--	Redirect keeps path and args,
		but not forward slash:
					-->
	<rule from="^http://www\.dtp\.nci\.nih\.gov/+"
		to="https://dtp.cancer.gov/" />

		<test url="http://www.dtp.nci.nih.gov/index.htm" />

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

</ruleset>
