Best practice for handling query vars


I’m new to nginx and using EasyEngine to get a jump-start on the config. I’ve run into the problems described in this post.

I need to fetch a $_GET variable passed as a URL query string, but my $_GET array is empty. I was able to resolve this problem by editing the /etc/nginx/common/wpsc.conf file and adding ?$query_string to this line:

try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$query_string;

I see from the other thread that there may be some incompatible plugins, like WooCommerce. That’s not an issue in my case, but I’m wondering what are the downsides to this approach.

Will this render much of my static file caching ineffective? The majority of requests to the site will have no query string, so I’d like to ensure caching is only being bypassed when a query string is present.

And is there a safer way to make this change that won’t get overridden when EasyEngine updates?

Thanks for any help you can provide.