Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Problem with try_files

$
0
0
Please tell me how you can specify the path to the necessary file in try_files in nginx for wp-rocket to output static files in wordpress.
The latest version of wp-rocket forms the next path to the static file -
wp-content/cache/wp-rocket/site.com/sterilisation-kitten/q=%2fsterilisation-kitten%2f/index.html

the wp-rocket manual contains the following code for nginx:

location / {
try_files /wp-content/cache/wp-rocket/$http_host/$cache_uri/index.html $uri/ /index.php?$args;
}

but nginx doesn't see it because there's another folder "q=%2fsterilisation-kitten%2f"

If I do that:
location / {"pos(192,210)}and the location / {{"pos(192,210)}.
try_files /wp-content/cache/wp-rocket/$http_host/$cache_uri/q=%2f$cache_uri%2f/index.html $uri/ /index.php?$args;
}

doesn't work :(

Please tell me how to do it correctly. Or just how to use a regular expression like to take any folder ".*"
Thank you.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>