Expires directive and try_files rewrites not working

Per Hansson nginx-forum at nginx.us
Wed Dec 2 21:22:01 MSK 2009

Hi, I am trying to use the try_files directive for rewrites together with the Expires directive but when I do file extensions which are included by the expires directive are ignored by my try_files directive, it seems like they are served directly...

Here is an example config; http://pastebin.com/m4c4819a0
Note that files named .js are included in the expires directive and that URL's that have "phpAdsNew" in them should get rewritten to "openxads", example URL; http://www.techspot.com/phpAdsNew/adx.js (it returns 404 with the pastebinned config)

Is this by design or am I just doing it wrong?
I am running nginx stable v0.7.63 on RHEL v5.4 together with php-fpm all from the Russian repository centos.alt.ru

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

More information about the nginx mailing list