Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fastcgi_param REQUEST_URI rewrite


  • To: nginx-ru@xxxxxxxxx
  • Subject: fastcgi_param REQUEST_URI rewrite
  • From: Bogdan <bogdar@xxxxxxxxx>
  • Date: Thu, 20 Mar 2014 19:42:59 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=35neBZYLBcE5KZRG9e7ofNpZUj3mQd1OvS+T3/HLkbo=; b=oJ3sZ+i/YQ6iWy3kiIceQBP+WS+2YLMyDiZDBbtRLCcZ2IsEUz9kl4RZUtbee8TAys FVvbuGqpc9bCV+3EJJQK8MW/ay6EZaT2Le3v6hawtqFUVbocYxeqggy6DZFXn9Eow52c 7XZ3BeYThMoUZoJ/Q3ZlF7H24k+0BZaRXmKirJsZXF15fgxxHSZlNU3/iHKNRmlkZlND W7DbhbsIadWXH2o+FQvUo1conZE1fBJvsoJH1Xsgv4yv7yKC/5v1Qev3xXCgX6DTzMk9 9OxqEx2AmWw/NfZTaaFc7mbC1tTENzVe5WOevYFykpbEgX3dAw3EAgR+pFgJgqTpXluN m0Jw==

.

rewrite REQUEST_URI "" rewrite

.. - :

URL: http://site.com/page-10

rewrite ^/page-(.*) /main/handler?page=$1;
rewrite ^/main/.* /router;

location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

# With php5-fpm:
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_connect_timeout 1;
fastcgi_send_timeout 1;
include fastcgi_params;
}

URL http://site.com/page-10 REQUEST_URI fastcgi- : /router?page=10
REQUEST_URI $request_uri "/page-10", $uri "/index.php"

, , if .. set
rewrite, fastcgi URI.

.

--
WBR, Bogdan B. Rudas
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.