Skip to content

Commit

Permalink
Host a static copy of forums.whatwg.org
Browse files Browse the repository at this point in the history
Static copy was made in whatwg/whatwg.org#118.

Some tricks are needed to make most old URLs work.
  • Loading branch information
foolip committed Dec 7, 2017
1 parent d2f3685 commit 119b3fb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions debian/marquee/DOMAINS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ domparsing.spec.whatwg.org
encoding.spec.whatwg.org
fetch.spec.whatwg.org
figures.idea.whatwg.org,figures.spec.whatwg.org
forums.whatwg.org
fullscreen.spec.whatwg.org
html-differences.whatwg.org
html.spec.whatwg.org,c.whatwg.org,developer.whatwg.org,developers.whatwg.org,help.whatwg.org,xn--7ca.whatwg.org
Expand Down
30 changes: 30 additions & 0 deletions debian/marquee/nginx/sites/forums.whatwg.org.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
server {
server_name forums.whatwg.org;
root /var/www/forums.whatwg.org;

ssl_certificate /etc/letsencrypt/live/forums.whatwg.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/forums.whatwg.org/privkey.pem;

include /etc/nginx/whatwg.conf;

location / {
index index.php;
}

location = / {
return 301 /bb3/;
}

location ~ \.php {
default_type text/html;

# strip &sid=... from the query string if present
if ($args ~ ^(.*?)&?sid=[a-z0-9]*$) {
set $stripped $1$2;
rewrite ^(.*)$ $1?$stripped? permanent;
}

# look for files with ? in the filename first
try_files "${uri}?${args}" $uri =404;
}
}
3 changes: 2 additions & 1 deletion test/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const HTTPS_TESTS = [
['https://domparsing.spec.whatwg.org/', 302, 'https://w3c.github.io/DOM-Parsing/', 'drop'],
['https://encoding.spec.whatwg.org/index-gbk.txt', 410],
['https://figures.spec.whatwg.org/', 302, 'https://figures.idea.whatwg.org/', 'keep'],
['https://forums.whatwg.org/', 301, 'https://forums.whatwg.org/bb3/index.php'],
['https://forums.whatwg.org/', 301, 'https://forums.whatwg.org/bb3/'],
['https://forums.whatwg.org/bb3/viewtopic.php?f=3&p=8538&sid=1cb9e434c59258d940d476648b0301df', 301, 'https://forums.whatwg.org/bb3/viewtopic.php?f=3&p=8538'],
['https://help.whatwg.org/', 301, 'https://html.spec.whatwg.org/dev/', 'drop'],
['https://html.spec.whatwg.org/C', 301, 'https://html.spec.whatwg.org/multipage/', 'keep'],
['https://html.spec.whatwg.org/complete', 301, 'https://html.spec.whatwg.org/', 'keep'],
Expand Down

0 comments on commit 119b3fb

Please sign in to comment.