diff --git a/config/ASP/etc/nginx/nginx.conf b/config/ASP/etc/nginx/nginx.conf index d391c0a..70725c8 100644 --- a/config/ASP/etc/nginx/nginx.conf +++ b/config/ASP/etc/nginx/nginx.conf @@ -92,6 +92,11 @@ http { return 401; } + # Pass sendsnapshot.aspx to bf2statistics.php + location ~ ^/ASP/sendsnapshot\.aspx$ { + rewrite /ASP/(.*)\.aspx /ASP/bf2statistics.php last; + } + # Pass .aspx to php location ~ ^/ASP/.*\.aspx$ { rewrite /ASP/(.*)\.aspx /ASP/index.php?aspx=$1 last; diff --git a/src/ASP/.htaccess b/src/ASP/.htaccess index 0473ef1..84f8fac 100644 --- a/src/ASP/.htaccess +++ b/src/ASP/.htaccess @@ -23,6 +23,13 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d + # Redirect sendsnapshot ASPX file call to the regular snapshot endpoint (bf2statistics.php) + RewriteRule ^.*/sendsnapshot\.aspx$ bf2statistics.php [L,NC] + + # Don't redirect direct links to non-existent files or directories to the index.php + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + # Redirect all ASPX file calls to the index.php?aspx=ASPX_FILENAME RewriteRule ^(.*)\.aspx$ index.php?aspx=$1 [QSA,L]