Skip to content

Commit

Permalink
feat: Allow snapshots to be sent to sendsnapshot.aspx
Browse files Browse the repository at this point in the history
  • Loading branch information
cetteup committed Dec 19, 2024
1 parent df86f71 commit 9f4a3ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/ASP/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/ASP/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 9f4a3ba

Please sign in to comment.