location /chat/ {
index index.php;
if (!-e $request_filename){
rewrite ^/chat/(.*)$ /chat/public/index.php?s=$1 last; break;
}
}
location /chat/ {
index index.php;
if (!-e $request_filename){
rewrite ^/chat/(.*)$ /chat/public/index.php?s=$1 last; break;
}
}