Allow direct-linking lobby

In the distant past, Lobby was open by default, so people linking
to Lobby usually meant to link to PS itself, so links to Lobby
would just open PS.

This is no longer necessary, now that we no longer open Lobby by
default.

This commit also cleans up a bunch of other .htaccess entries,
for style/readability.
This commit is contained in:
Guangcong Luo
2023-10-25 16:34:22 +00:00
parent 1b04902c83
commit 908fe3a320
2 changed files with 15 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteCond %{QUERY_STRING} !^insecure [NC]
RewriteRule ^([A-Za-z0-9-]*)$ https://play.pokemonshowdown.com/$1 [R=307,NE,L]
# basic stuff
# redirects
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteRule ^appeals?\/?$ https://play.pokemonshowdown.com/view-help-request--appeal [R=302,L]
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
@@ -121,16 +121,16 @@ Header set Pragma "no-cache" env=INDEX_PAGE
Header set Expires "0" env=INDEX_PAGE
# No direct linking to the lobby.
RewriteCond %{ENV:SCRIPT_URL} ^/(lobby/?)?$
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?:\/\/([a-z0-9-]+.)?(pokemonshowdown\.com|appjs)
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=162.243.13.96
RewriteCond %{HTTP:CF-Connecting-IP} !=173.252.196.254
RewriteCond %{HTTP:CF-Connecting-IP} !=198.27.67.31
RewriteCond %{HTTP:CF-Connecting-IP} !=162.243.13.96
RewriteRule ^.* https://pokemonshowdown.com/ [R=303,L]
# RewriteCond %{ENV:SCRIPT_URL} ^/(lobby/?)?$
# RewriteCond %{HTTP_REFERER} !^$
# RewriteCond %{HTTP_REFERER} !^https?:\/\/([a-z0-9-]+.)?(pokemonshowdown\.com|# appjs)
# RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$
# RewriteCond %{REMOTE_ADDR} !=127.0.0.1
# RewriteCond %{REMOTE_ADDR} !=162.243.13.96
# RewriteCond %{HTTP:CF-Connecting-IP} !=173.252.196.254
# RewriteCond %{HTTP:CF-Connecting-IP} !=198.27.67.31
# RewriteCond %{HTTP:CF-Connecting-IP} !=162.243.13.96
# RewriteRule ^.* https://pokemonshowdown.com/ [R=303,L]
AddType 'text/plain; charset=UTF-8' json5

View File

@@ -11,9 +11,9 @@ allow from all
order deny,allow
deny from all
</Limit>
#AuthName pokemonshowdown.com
#AuthUserFile /home/pokemon/public_html/_vti_pvt/service.pwd
#AuthGroupFile /home/pokemon/public_html/_vti_pvt/service.grp
# AuthName pokemonshowdown.com
# AuthUserFile /home/pokemon/public_html/_vti_pvt/service.pwd
# AuthGroupFile /home/pokemon/public_html/_vti_pvt/service.grp
AddType text/plain .phps
AddType application/octet-stream .heapsnapshot
@@ -35,7 +35,7 @@ RewriteRule ^(.*)$ https://pokemonshowdown.com/$1 [R=302,NE,L]
RewriteCond %{HTTP_HOST} ^(www\.)?forum\.pokemonshowdown\.com$ [NC]
RewriteRule ^(.*)$ https://pokemonshowdown.com/forums/ [R=301,NE,L]
RewriteCond %{HTTP_HOST} !^pokemonshowdown\.com$
RewriteCond %{HTTP_HOST} ^www\.pokemonshowdown\.com$
RewriteRule ^(.*)$ https://pokemonshowdown.com/$1 [R=301,NE,L]
RewriteRule ^secure$ ./ [L,QSA]