-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Host a static copy of forums.whatwg.org
Static copy was made in whatwg/whatwg.org#118. Some tricks are needed to make most old URLs work.
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters