Created
February 10, 2012 09:48
-
-
Save markahesketh/1788142 to your computer and use it in GitHub Desktop.
This file contains 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
location / { | |
index index.php; | |
# serve static files directly | |
if (-f $request_filename) { | |
access_log off; | |
expires 30d; | |
break; | |
} | |
### BACKEND | |
if ($request_filename ~ /symphony/) { | |
rewrite ^/symphony/?$ /index.php?mode=administration&$query_string last; | |
rewrite ^/symphony(/(.*/?))?$ /index.php?symphony-page=$1&mode=administration&$query_string last; | |
} | |
### IMAGE RULES | |
rewrite ^/image/(.+\.(jpg|gif|jpeg|png|bmp|JPG|GIF|JPEG|PNG|BMP))$ /extensions/jit_image_manipulation/lib/image.php?param=$1 last; | |
## Add trailing slash | |
rewrite ^(.*[^/])$ $1/ permanent; | |
### MAIN REWRITE - This will ignore directories | |
if (!-d $request_filename) { | |
rewrite ^/(.*)$ /index.php?symphony-page=$1 last; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment