Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name stony.local br.stony.local;
- root /Users/marcus/Htdocs/stony;
- index index.php index.html index.htm;
- if ($host ~* ^www\.(.*)){
- set $host_without_www $1;
- rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
- }
- if ($host ~* (.*)\.stony\.local) {
- set $sub_domain $1;
- rewrite ^(.*)$ /$1?lang=$sub_domain last;
- }
- if ($request_uri ~* ^(/principal(/index)?|/index(.php)?)/?$) {
- rewrite ^(.*)$ / permanent;
- }
- if ($request_uri ~* index/?$) {
- rewrite ^/(.*)/index/?$ /$1 permanent;
- }
- if (!-d $request_filename) {
- rewrite ^/(.+)/$ /$1 permanent;
- }
- if ($request_uri ~* ^/system) {
- rewrite ^/(.*)$ /index.php?/$1 last;
- break;
- }
- if (!-e $request_filename) {
- rewrite ^/(.*)$ /index.php?/$1 last;
- break;
- }
- error_page 404 /index.php;
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /Users/marcus/Htdocs/stony$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement