From 4663cae65aceeba4deef5d6040e2b35e7d19cd4a Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 27 Jan 2014 23:34:43 -0600 Subject: [PATCH] Update replay redirects --- .htaccess | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index 752d8cf8f..a5396e030 100644 --- a/.htaccess +++ b/.htaccess @@ -22,12 +22,12 @@ RewriteRule ^style/font/.*?\.(eot|svg|ttf|woff)$ - [E=SAFE_RESOURCE:1] Header set Access-Control-Allow-Origin * env=SAFE_RESOURCE # Redirect old battles to their corresponding replay +# RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +# RewriteRule ^battle-([a-z0-9]+-3[0-3][0-9]{6})$ http%{ENV:P_SUFFIX}://replay.pokemonshowdown.com/$1 [R=302,L] RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] -RewriteRule ^battle-([a-z0-9]+-3[0-3][0-9]{6})$ http%{ENV:P_SUFFIX}://pokemonshowdown.com/replay/$1 [R=302,L] +RewriteRule ^battle-([a-z0-9]+-?[1-7][0-9]{7})$ http%{ENV:P_SUFFIX}://replay.pokemonshowdown.com/$1 [R=302,L] RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] -RewriteRule ^battle-([a-z0-9]+-?[1-2][0-9]{7})$ http%{ENV:P_SUFFIX}://pokemonshowdown.com/replay/$1 [R=302,L] -RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] -RewriteRule ^battle-([a-z]+[0-9]{1,7})$ http%{ENV:P_SUFFIX}://pokemonshowdown.com/replay/$1 [R=302,L] +RewriteRule ^battle-([a-z]+[0-9]{1,7})$ http%{ENV:P_SUFFIX}://replay.pokemonshowdown.com/$1 [R=302,L] # TODO: fix bug where you can't join lobby directly RewriteRule ^lobby/?$ / [R=301,L]