Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/chrome/content/rules/ReadTheDocs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

<target host="readthedocs.com" />
<target host="*.readthedocs.com" />

<target host="readthedocs.io" />
<target host="*.readthedocs.io" />

<target host="rtfd.org" />
<target host="*.rtfd.org" />
Expand All @@ -20,11 +23,13 @@

<test url="http://testing.readthedocs.org/" />
<test url="http://blog.readthedocs.com/" />
<test url="http://docs.readthedocs.io/" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add at least 3 test urls.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patryk from memory you'll need 3 urls per wildcard rule.

You could use
http://readthedocs.io
http://www.readthedocs.io
http://jupyter.readthedocs.io

And use those for .org and rtfd.org too

Popular subdomains can be found on http://www.alexa.com/siteinfo/readthedocs.org ctrl-f "Where do visitors go"

<test url="http://testing.rtfd.org/" />

<securecookie host="^readthedocs\.org$" name=".+" />
<securecookie host="^readthedocs\.com$" name=".+" />
<securecookie host="^readthedocs\.io" name=".+" />

<rule from="^https?://(.+\.)?rtfd\.org/" to="https://$1readthedocs.org/" />
<rule from="^http://([\w-]+\.)?rtfd\.org/" to="https://$1readthedocs.io/" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is obsolete with the generic redirect below.

@fuzzyroddis fuzzyroddis May 12, 2016 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly rtfd.org does not support HTTPS however, so we need to redirect straight to https://$1readthedocs.io

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