Nginx Drupal Rewrite

Michael Shadle mike503 at
Wed May 20 20:43:45 MSD 2009

2009/5/20 Igor Sysoev <is at>:

> 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&

I think this assumes Drupal is running with friendly URLs enabled,
which are extensionless, and also, the PHP script will see that as a
single parameter still, just 'q'

Since the slug /some/page.html is 'q', the & will be ignored as it is
a standard query string.

I think WordPress might do it slightly differently in how it parses
the URI, which is why it worked without $args (at least it appeared to
for a long time for me) - Drupal apparently needs the args passed to
it, whereas WordPress probably grabs the URI from another source (and
actually you might be able to pass nothing to the index.php and it
handles it from PATH_INFO. I think.)

More information about the nginx mailing list