wpsharks / comet-cache

An advanced WordPress® caching plugin inspired by simplicity.
https://cometcache.com
GNU General Public License v3.0
77 stars 18 forks source link

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

Open JordanMG opened 5 years ago

JordanMG commented 5 years ago

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

To replicate:

lkraav commented 5 years ago

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 commented 5 years ago

The debug output shows the trailing slash in the URL.

lkraav commented 5 years ago

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 commented 5 years ago

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/