Hey All,
I am new to the forums and have a question that I was not able to find an answer for via googling. I have some conditional expiration dates I would like to set up but I was hoping to avoid some complicated (IF) statement. I will just give the requirements.
All jpg|jpeg|gif|png|css|js|ico|xml files should have an expiration of 2 days.
All jpg|jpeg|gif|png|js in ^/styles/ & ^/js/ should have an expiration on 31 days.
http://domain.com/styles/default/xenforo/icons/image.png
http://domain.com/js/script.js
And All jpg|jpeg|gif|png with a series of numbers at the end should have an expiration of 1 hour.
http://domain.com/data/avatars/s/0/15.jpg?1379247393
I tried all four as individual locations, but they all took the first 2 day entry. feel free to simply direct me to a resource if you like. Just because I didn't find it on the web, doesn't mean it isn't there.
Here is what I have as the first entry which obviously is overriding every other condition I enter.
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 2d;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
Thanks,
-Bill
Edited 2 time(s). Last edit at 09/30/2013 01:13PM by qops1981.