Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.883 kb
################ Cotonti Handy URLs for Nginx #######################
# Below are the rules to be included in your nginx.conf
# inside the "location / { ... }" section
# If you run Cotonti in a subfolder, prepend it to all paths below, e.g.
# rewrite "^/my/path/to/(datas|...." /my/path/to/$1...
# File protection
location ~ \.(tpl|dat)$ {
deny all;
}
# Language selector
rewrite "^/(en|ru|de|nl)/(.*)" /$2?l=$1;
# Protect standard .php URLs
rewrite "^/([a-z]+)\.php(.*)$" /$1.php$2 last;
# Admin area and message are special scripts
rewrite "^/admin/([a-z0-9]+)" /admin.php?m=$1 last;
rewrite "^/(admin|login|message)(/|\?|$)" /$1.php last;
# System category has priority over /system folder
rewrite "^/system/?$" /index.php?rwr=system last;
# All the rest goes through standard rewrite gateway
if (!-e $request_filename) {
rewrite "^/([^?]+)" /index.php?rwr=$1 last;
}
Jump to Line
Something went wrong with that request. Please try again.