atom feed29 messages in ru.sysoev.nginxRe: Rewrite help when files do NOT ha...
FromSent OnAttachments
pk899Jun 1, 2011 5:00 am 
António P. P. AlmeidaJun 1, 2011 6:05 am 
pk899Jun 1, 2011 6:22 am 
António P. P. AlmeidaJun 1, 2011 6:30 am 
Edho P AriefJun 1, 2011 6:32 am 
pk899Jun 1, 2011 7:02 am 
António P. P. AlmeidaJun 1, 2011 7:23 am 
pk899Jun 1, 2011 7:31 am 
António P. P. AlmeidaJun 1, 2011 7:53 am 
pk899Jun 1, 2011 8:29 am 
António P. P. AlmeidaJun 1, 2011 8:42 am 
pk899Jun 2, 2011 3:10 am 
António P. P. AlmeidaJun 2, 2011 11:53 am 
Marcos OrtizJun 2, 2011 12:27 pm 
Alexandr GomoliakoJun 2, 2011 1:12 pm 
Marcos Ortiz ValmasedaJun 2, 2011 1:17 pm 
pk899Jun 2, 2011 4:33 pm 
António P. P. AlmeidaJun 2, 2011 5:40 pm 
pk899Jun 2, 2011 6:21 pm 
António P. P. AlmeidaJun 2, 2011 6:44 pm 
pk899Jun 2, 2011 7:08 pm 
António P. P. AlmeidaJun 2, 2011 7:19 pm 
Antoine BonavitaJun 3, 2011 1:33 am 
pk899Jun 3, 2011 11:37 am 
pk899Jun 3, 2011 11:40 am 
António P. P. AlmeidaJun 3, 2011 11:46 am 
pk899Jun 3, 2011 9:26 pm 
António P. P. AlmeidaJun 4, 2011 9:08 am 
pk899Jun 4, 2011 10:51 pm 
Subject:Re: Rewrite help when files do NOT have a ".php" extension
From:pk899 (ngin@nginx.us)
Date:Jun 1, 2011 7:31:23 am
List:ru.sysoev.nginx

António P. P. Almeida Wrote:

This won't work unless you have defined the name of the script that is to be executed by the upstream fastcgi process.

What is the name of the script that receives the u argument? get.php? index.php?

Oh I see. I had totally misunderstood how this works.

The name of the script is "/site/get". Without the .php extension.

And the uri should be passed as "?u=" and in some case there will be a second variable "&sb=". The rewrite rules will work this way:

#-------------- location / { rewrite ^/([-~a-zA-Z0-9_\.]+)(.+)$ /site/get?u=$1&sb=$2; rewrite ^/([-~a-zA-Z0-9_\.]+)$ /site/get?u=$1; } #--------------

So basically I can do the upstream bit this way?

#-------------- include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$/site/get; fastcgi_param PATH_TRANSLATED $document_root$/site/get; #--------------

Thanks for any ideas. (This is not working)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,202956,203003#msg-203003