Skip to content

Commit 88b62c0

Browse files
Merge pull request #81 from cetteup/feat/aspx-snapshot-endpoint
feat: Allow snapshots to be sent to sendsnapshot.aspx
2 parents 301eac3 + 9f4a3ba commit 88b62c0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: config/ASP/etc/nginx/nginx.conf

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ http {
9292
return 401;
9393
}
9494

95+
# Pass sendsnapshot.aspx to bf2statistics.php
96+
location ~ ^/ASP/sendsnapshot\.aspx$ {
97+
rewrite /ASP/(.*)\.aspx /ASP/bf2statistics.php last;
98+
}
99+
95100
# Pass .aspx to php
96101
location ~ ^/ASP/.*\.aspx$ {
97102
rewrite /ASP/(.*)\.aspx /ASP/index.php?aspx=$1 last;

Diff for: src/ASP/.htaccess

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
RewriteCond %{REQUEST_FILENAME} !-f
2424
RewriteCond %{REQUEST_FILENAME} !-d
2525

26+
# Redirect sendsnapshot ASPX file call to the regular snapshot endpoint (bf2statistics.php)
27+
RewriteRule ^.*/sendsnapshot\.aspx$ bf2statistics.php [L,NC]
28+
29+
# Don't redirect direct links to non-existent files or directories to the index.php
30+
RewriteCond %{REQUEST_FILENAME} !-f
31+
RewriteCond %{REQUEST_FILENAME} !-d
32+
2633
# Redirect all ASPX file calls to the index.php?aspx=ASPX_FILENAME
2734
RewriteRule ^(.*)\.aspx$ index.php?aspx=$1 [QSA,L]
2835

0 commit comments

Comments
 (0)