Disable caching of a single file with try_files directive

Found a solution using nginx named locations:

location = / {
    add_header Cache-Control no-cache;
    expires 0;
    try_files /index.html =404;
}

location / {
    gzip_static on;
    try_files $uri @index;
}

location @index {
    add_header Cache-Control no-cache;
    expires 0;
    try_files /index.html =404;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)