• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Issue nginx caching not working with apache RewriteRule and flag [last]?

Azurel

Silver Pleskian
I have set in apache and nginx a expired one year. That's working. I can see one year for "expires" in header. Now I want access few file-types with a rewrite (without redirect)

Code:
RewriteRule fake/(.+\.(?:js|php))$ original/$1 [L]

That RewriteRule is working. I can access this files, but the "expires" header in "fake/file.js" is gone. What am I doing wrong?

example.com/original/file.js = expires in one year
example.com/fake/file.js = no header for expires
 
Back
Top