Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do we add q=$uri in fastcgi_drupal.conf #242

Open
njt1982 opened this issue Mar 4, 2016 · 5 comments
Open

Why do we add q=$uri in fastcgi_drupal.conf #242

njt1982 opened this issue Mar 4, 2016 · 5 comments

Comments

@njt1982
Copy link

njt1982 commented Mar 4, 2016

I have been investigating a Redirect bug in Drupal 8 where, on redirect, the query string always gets "?q=node/123" tagged onto it, regardless of querystring preservation. See: md-systems/redirect#70 (comment)

It appears to be possibly related to this line:
https://github.com/perusio/drupal-with-nginx/blob/D7/apps/drupal/fastcgi_drupal.conf#L4

When I removed the q= param from that, redirects began to function correctly and the rest of the site behaved normally (ie, URLs still worked).

What purpose does this line serve? Is it needed for D7? All my D7 sites locally still seem to work...

@longwave
Copy link

longwave commented Mar 4, 2016

It appears this is needed for D6 compatibility; D7 and above should work without it.

@stewsnooze
Copy link

@njt1982 are you filing code with this issue?

@tdm4
Copy link

tdm4 commented Mar 17, 2017

I noticed our Drupal 8 sites would append ?q=/ to the end of the top site URL.
I removed the QUERY_STRING in fastcgi_drupal.conf and that fixed it.

How come there's no D8 branch in the repo?

@tdm4
Copy link

tdm4 commented Mar 23, 2017

@njt1982 @stewsnooze @longwave I just discovered something. Commenting out QUERY_STRING from fastcgi params breaks the site in some ways (like filtering in the /admin/content page), but if you set it like this (for Drupal 8), it works fine:

fastcgi_param QUERY_STRING $query_string;

Give it a try?

@superfedya
Copy link

Works fine. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants