Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow snapshots to be sent to sendsnapshot.aspx #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading