-
-
Save abishekrsrikaanth/a147952dfe93812fbf79a6ab0b215815 to your computer and use it in GitHub Desktop.
Unix conf: Sendy nginx rewrite rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index index.php index.html; | |
root /your/path/to/the/sendy; | |
location = / { | |
index index.php; | |
} | |
location / { | |
if (!-f $request_filename){ | |
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last; | |
} | |
} | |
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; | |
} | |
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { | |
expires max; | |
log_not_found off; | |
} | |
location ~ \.php { | |
fastcgi_index index.php; | |
include fastcgi_params; | |
keepalive_timeout 0; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass 127.0.0.1:9000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment