How to cache js/css request containing a question mark?

biazus nginx-forum at nginx.us
Mon Aug 31 16:57:22 UTC 2015


Please try to remove $ in the end of the expression:

something like this:

location ~ .*\.(js|css) {
expires 7d;
}

Also, make sure you are using args in the cache key:

proxy_cache_key		"$host$uri$is_args$args";

Regards,
Biazus

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261338,261339#msg-261339



More information about the nginx mailing list