Welcome! Log In Create A New Profile

Advanced

RE: Странности с QUERY_STRING

April 14, 2010 03:32AM
Пока сделал так:
На уровне server
if ($request_uri ~ ^.(.*)$) {
set $my_uri $1;
}

location / {
index index.php;
#<----->try_files $uri $uri\ @nedrupal;
<------>error_page 404 = @nedrupal;
}

location ~ \.php$ {
try_files \$uri \@nedrupal;
fastcgi_param<->QUERY_STRING<--><------>\$args;
....
}

location @nedrupal {
<------>fastcgi_param SCRIPT_FILENAME /home/users/index.php;
fastcgi_param SCRIPT_NAME /index.php;
<------>fastcgi_param PATH_INFO /index.php;
<------>fastcgi_pass unix:/mnt/md0/php-fcgi.sock;
<------>fastcgi_pass_request_body off;
<------>client_body_in_file_only clean;
<------>fastcgi_param<->REQUEST_BODY_FILE<----->$request_body_file;
<------>fastcgi_param<->CONTENT_TYPE<--><------>$content_type;
<------>fastcgi_param<->CONTENT_LENGTH<><------>$content_length;
<------>fastcgi_param<->DOCUMENT_ROOT<-><------>$document_root;
<------>fastcgi_param<->DOCUMENT_URI<--><------>$document_uri;
<------>fastcgi_param<->GATEWAY_INTERFACE<----->CGI/1.1;
<------>fastcgi_param<->QUERY_STRING<--><------>permalink=$my_uri&query_str=
$args;
<------>fastcgi_param<->REMOTE_ADDR<---><------>$remote_addr;
<------>fastcgi_param<->REMOTE_PORT<---><------>$remote_port;
<------>fastcgi_param<->REQUEST_URI<---><------>$request_uri;
<------>fastcgi_param<->REQUEST_METHOD<><------>$request_method;
<------>fastcgi_param<->SERVER_ADDR<---><------>$server_addr;
<------>fastcgi_param<->SERVER_NAME<---><------>$server_name;
<------>fastcgi_param<->SERVER_PORT<---><------>$server_port;
<------>fastcgi_param<->SERVER_PROTOCOL><------>$server_protocol;
<------>fastcgi_param<->SERVER_SOFTWARE <------>nginx/$nginx_version;
<------>fastcgi_param<->REDIRECT_STATUS 200;
#<----->fastcgi_index<->index.php;
}

Но это как то неправильно. Может есть другие решения ?
И насчет try_files в каких локейшенах они нужны а в каких нет?


-----Original Message-----
From: maxhl [mailto:maxhl@hitline.net.ua]
Sent: Tuesday, April 13, 2010 6:08 PM
To: nginx-ru@nginx.org
Subject: Странности с QUERY_STRING

День добрый.
Возникли отличия в QUERY_STRING по сравнением с апачем.
Делаю так:
fastcgi_param<->QUERY_STRING<--><------>permalink=$uri&query_str=$args;
В апаче permalink=video-1/Kino-1/&query_str=
В nginx permalink=/video-1/Kino-1/&query_str=
Тоесть на слеш больше.
Как это исправить?
____________________________
С уважением Max ICQ 71006063
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru


_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Странности с QUERY_STRING

maxhl April 13, 2010 11:10AM

Re: Странности с QUERY_STRING

jjjx128 April 13, 2010 11:24AM

RE: Странности с QUERY_STRING

maxhl April 13, 2010 11:32AM

RE: Странности с QUERY_STRING

maxhl April 13, 2010 01:48PM

RE: Странности с QUERY_STRING

maxhl April 14, 2010 03:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 48
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready