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

Trailing-slash 301 redirects not working when Comet Cache enabled #931

Open
JordanMG opened this issue Sep 19, 2018 · 4 comments
Open

Trailing-slash 301 redirects not working when Comet Cache enabled #931

JordanMG opened this issue Sep 19, 2018 · 4 comments

Comments

@JordanMG
Copy link

When Comet Cache is activated, trailing-slash 301 redirects (if configured) do not work on posts.

To replicate:

  • create a fresh WordPress install on Nginx
  • configure the "post name" permalink settings in WordPress
  • confirm that posts without a trailing slash 301-redirect to the slashed version
    (example.com/post-name -> example.com/post-name/)
  • activate comet cache
  • as a guest user who views the cached page, note that the redirect no longer takes place
    (example.com/post-name -> example.com/post-name)
@lkraav
Copy link

lkraav commented Sep 19, 2018

What does the Comet Cache debug output at the cached page bottom say? What URL does it think it's showing?

EDIT my Apache-based trailing slash redirects have been working fine for a few years now.

@JordanMG
Copy link
Author

The debug output shows the trailing slash in the URL.

@lkraav
Copy link

lkraav commented Sep 21, 2018

I'm thinking it's an nginx config issue. Comet Cache shouldn't even be getting a hit, if you're properly redirecting at webserver level.

@JordanMG
Copy link
Author

Yeah, I never imagined Comet Cache would be dealing with this either, but it seems to be.

Nginx config:
location / { try_files $uri $uri/ /index.php?$args ; }

The issue can also be replicated on the official Comet Cache blog:

https://cometcache.com/blog
https://cometcache.com/blog/

https://cometcache.com/blog/comet-cache-v170808-rc-release-candidate
https://cometcache.com/blog/comet-cache-v170808-rc-release-candidate/

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