Answer the question
In order to leave comments, you need to log in
How to compose a regular expression for try_files nginx?
Please tell me how you can specify the path to the desired file in try_files in nginx for wp-rocket to issue static. files in wordpress.
The latest wp-rocket builds a footprint. path to 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. there is another folder "q=%2fsterilisation-kitten%2f"
If I do this:
location / {
try_files /wp-content/cache/wp-rocket/$http_host/$cache_uri/q=%2f$cache_uri%2f/index. html $uri/ /index.php?$args;
}
does not work :(
Please tell me how to do it right. Or just how to use a regular expression like take any folder ".*"
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question