Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document suggestion for trailing slash #35

Open
deepaksp opened this issue Jan 5, 2019 · 1 comment
Open

document suggestion for trailing slash #35

deepaksp opened this issue Jan 5, 2019 · 1 comment

Comments

@deepaksp
Copy link

deepaksp commented Jan 5, 2019

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;
}
@harrisnl
Copy link

harrisnl commented Dec 11, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants