Bug :: NGINX Compat. :: `$_GET['q']` #561
Comments
Short-Term FixChange:
To:
|
I should note that the |
Closed by wpsharks/comet-cache-pro#137. |
Next Pro Release Changelog:
|
ZenCache Pro v151002 has been released and includes changes from this GitHub Issue. See the ZenCache Pro v151002 release announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#561). |
Overview
Referencing: http://wiki.nginx.org/Pitfalls#Front_Controller_Pattern_based_packages
This is a popular configuration for Nginx servers.
The
$_GET['q']
variable being passed to WordPress & ZenCache though; it can prevent an entire site from being cached. This is because ZenCache, by default, will not cache URLs that contain a query string. With this Nginx config, all requests include the?q=
variable.Steps to Reproduce
Fire up Nginx
Use a configuration like this.
Enable pretty permalinks in WordPress.
Visit any page on the site.
Expected Behavior
That fancy permalinks would be cached.
Observed Behavior
<!-- ZenCache is NOT caching this page, because `$_GET` contains query string data. The current configuration says NOT to cache GET requests with a query string. -->
Possible Solution
ZenCache already has a check for special query vars. We could add
q
to the list of special query vars whenever we can detect that a site is running Nginx. That way the$_GET['q']
and$_SERVER['QUERY_STRING']
environment vars will not prevent caching.The text was updated successfully, but these errors were encountered: