Skip to content

Instantly share code, notes, and snippets.

@Snawoot
Created February 18, 2013 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Snawoot/4979574 to your computer and use it in GitHub Desktop.
Save Snawoot/4979574 to your computer and use it in GitHub Desktop.
location / {
try_files $uri $uri/ @rewr;
}
location @rewr {
rewrite ^([\w\d]+)/?$ /index.php?module=$1 break;
rewrite ^([\w\d]+)/([^/]+)/?$ index.php?module=$1&do=$2 break;
rewrite ^([\w\d]+)/([^/]+)/([^/]+)/?$ index.php?module=$1&do=$2&type=$3 break;
}
location = /index.php {
# pass to fastcgi
}
location ~ .*\.php$ {
#same shit
}
@firsov
Copy link

firsov commented Feb 18, 2013

spasibo bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment