It is impossible to make a revwrite from http://blabla.mysite.ru/ to http://mysite.ru/index.php/page/blabla ... I did it as in the config below, but it seems to be trying to open file /www/mysite/index.php/page/blabla , which, of course, does not exist.
I make a 302 redirect, but it changes the url in the browser, which is not necessary. How to solve a problem?
location / { try_files $uri /index.php?$args; set $uid "www"; if ($host ~ "^([a-z0-9\-]+)\.mysite\.ru$") { set $uid $1; } if ($uid !~ "^(www)$") { rewrite ^(.*)$ /index.php/page/$uid last; } }