Migrate teams/replays away from .template.html

(`wrapper.inc.template.php` remains, because that's from the old
replays/manage, and I'm gonna just rewrite that soon.)
This commit is contained in:
Guangcong Luo
2026-07-23 19:55:08 +00:00
parent 0de9c6a79b
commit 079dfb3739
4 changed files with 3350 additions and 17 deletions

View File

@@ -1,3 +1,8 @@
RewriteEngine on
RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L]
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html
AddType text/plain .phps
AddType application/x-tgz .tgz
AddType application/x-chrome-extension .crx
@@ -18,9 +23,6 @@ AddType application/x-web-app-manifest+json .webapp
Header set Access-Control-Allow-Methods "GET,POST,OPTIONS"
</filesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteRule ^([A-Za-z0-9-]*)$ https://play.pokemonshowdown.com/$1 [R=307,NE,L]
@@ -175,8 +177,3 @@ RewriteRule ^testclient-beta\.html$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(apple-touch-icon-precomposed\.png)$ - [R=404,L]
</IfModule>
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,13 @@
RewriteEngine on
RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L]
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html
# cached index.php
RewriteRule ^$ caches/index.php [L]
RewriteRule ^index\.php$ caches/index.php [L,QSA]
RewriteRule ^([A-Za-z0-9-]+)$ caches/index.php?name=$1 [L,QSA]
RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L]
RewriteRule ^search\.json$ /api/replays/search.json [L,QSA]
RewriteRule ^recent\.json$ /api/replays/search.json [L,QSA]
RewriteRule ^download$ download.html [L,QSA]
@@ -19,9 +21,6 @@ RewriteRule ^([A-Za-z0-9-]+)\.log$ /api/replays/get.log?id=$1 [L,QSA]
RewriteRule ^([A-Za-z0-9-]+)\.inputlog$ /api/replays/get.inputlog?id=$1 [L,QSA]
RewriteRule ^([A-Za-z0-9-]+)\.json$ /api/replays/get.json?id=$1 [L,QSA]
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html
# Disallow direct access to caches
RewriteCond %{THE_REQUEST} \s/caches/
RewriteRule ^caches/ - [F]

View File

@@ -1,15 +1,13 @@
RewriteEngine on
RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L]
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html
# cached index.html
RewriteRule ^$ caches/index.html [L,QSA]
RewriteRule ^index\.html$ caches/index.html [L,QSA]
RewriteRule ^([A-Za-z0-9-/]+)$ caches/index.html [L,QSA]
RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L]
DirectoryIndex index.php index.html /dirindex/dirindex.php
ErrorDocument 404 /dirindex/404.html
# Disallow direct access to caches
RewriteCond %{THE_REQUEST} \s/caches/
RewriteRule ^caches/ - [F]