page-cache icon indicating copy to clipboard operation
page-cache copied to clipboard

document suggestion for trailing slash

Open deepaksp opened this issue 7 years ago • 1 comments

hi thr, great package this issue is for those who use trailing slash (like me) in thr url ! in that case default nginx configure doesnt work (i don't why)

here is nginx config

location = / {
	try_files /page-cache/pc__index__pc.html /index.php?$query_string;
}

location / {
	try_files $uri $uri/ /page-cache/$uri/pc__index__pc.html /index.php?$query_string;
}

deepaksp avatar Jan 05 '19 08:01 deepaksp

I don't understand what you're saying.

JosephSilber avatar Sep 10 '20 13:09 JosephSilber

@deepaksp Nice addition, I had the same issue.

When the url structure of your website has trailing slashes ( e.g. /blog/this-is-my-blog-title/ ) the plugin creates this file: /page-cache/blog/this-is-my-blog-title/pc__index__pc.html so the nginx config has to be changed to the above to make the caching work as expected.

harrisnl avatar Dec 11 '20 14:12 harrisnl