| Nginx-ru mailing list archive (nginx-ru@sysoev.ru) [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: nginx регулярные выражени	я
 
 
On 08/23/11 11:31, quux wrote:
 
У меня такая проблема: нужно чтобы
http://domain.com/anchor/value
перенаправлялось на
http://domain.com/script.php?value
location /anchor/ {
                rewrite /anchor/(.*)$ http://domain.com/script.php?$1;
}
переделывает адресную строку в
браузере. А хотелось бы чтоб адресная
строка в браузере так и оставалась вида
http://domain.com/anchor/value
 
Наверно у вас php проксируется на какой то бэкенд (по http или fastcgi), тогда 
можно сделать как то так: 
location ~ ^/anchor/(?<value>.*)$ {
   proxy_pass http://127.0.0.1:8080/script.php?$value;
}
--
 Anton Yuzhaninov
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
 |