nystudio107 / nginx-craft

An Nginx virtual host configuration for Craft CMS that implements a number of best-practices.
MIT License
310 stars 37 forks source link

Fix multi-site requests missing query params #26

Closed engram-design closed 3 years ago

engram-design commented 3 years ago

For the Forge example on a multi-site with subfolder setups, query strings aren't added to the URL rewrites.

To explain, we have a Craft install with two sites: http://sitename.com/ - The UK site http://sitename.com/australia-nz - The AU/NZ site

Let's say I visit http://sitename.com/australia-nz/query-test?test=something. I get the following dumping the request:

Screen Shot on 2020-10-21 at 13:47:39

The query params are nowhere to be seen! After adding this change, the query params are present.

Screen Shot on 2020-10-21 at 13:49:01

Also gives the added bonus of not relying on ?p= rewrites, and using $query_string is consistent with your other directives.

khalwat commented 3 years ago

Thanks @engram-design !