Skip to content

Instantly share code, notes, and snippets.

@ideabrian
Created December 14, 2018 01:51
Show Gist options
  • Save ideabrian/67bacd5dfd8bd3f727dac2dc67b1db27 to your computer and use it in GitHub Desktop.
Save ideabrian/67bacd5dfd8bd3f727dac2dc67b1db27 to your computer and use it in GitHub Desktop.
Nginx configuration file for Sendy (https://sendy.co/). This code snippet is an exact transposition of the original .htaccess provided with Sendy.
location / {
try_files $uri $uri/ $uri.php?$args;
}
location /l/ {
rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
}
location /t/ {
rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
}
location /w/ {
rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
}
location /unsubscribe/ {
rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
}
location /subscribe/ {
rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment