Nginx Drupal Rewrite
Igor Sysoev
is at rambler-co.ru
Wed May 20 17:28:34 MSD 2009
On Wed, May 20, 2009 at 08:22:09PM +0700, Hendry Lee wrote:
> > So, just to make clear: this
> >
> > try_files $uri $uri/ /foo/index.php?q=$request_uri;
> >
> > does not work, but this
> >
> > try_files $uri $uri/ /foo/index.php?q=$uri&$args;
> >
> > works.
>
> Correct.
>
> > How does Drupal go with zero $args ? I.e., /foo/index.php?$uri& ?
>
> Failed too, as reported by someone earlier. $args is crucial in try_files
> for Drupal to work. This is a sample of url that generated an error.
No, I meant how does Drupal go with trailing "&", if an original request
has no query string at all, say
/some/page.html
will be //foo/index.php?q=/some/page.html&
> Http://example.com/request/ajax/handle?operation=validate_url&url=http%3A%2F
> %2Fgoogle.com%2F
>
> When the PHP code checked the 'operation' variable, as in
>
> if ($_REQUEST['operation']), it returned false.
>
> With try_files $uri $uri/ /foo/index.php?q=$request_uri; it acts exactly
> like my previous rewrite line.
>
> if (!-e $request_filename) {
> rewrite ^/(.*)$ /index.php?q=$1 last;
> break;
> }
>
> --
> Hendry
>
>
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list