Closed coreykn closed 4 years ago
Add logic for if trailing slash is removed on purpose (e.g. custom structure https://www.example.com/%postname%
). If a page is requested with a trailing slash (e.g. https://www.example.com/about/
) bypass the cache to allow a redirect to a location without the trailing slash (e.g. https://www.example.com/about
).
WordPress topic: https://wordpress.org/support/topic/url-without-or-without-the-trailing-slash-both-get-rendered/
In some cases when a page is requested without a trailing slash (e.g.
https://www.example.com/about
) the cached file is returned instead of bypassing the cache to allow a redirect to a location with the trailing slash appended (e.g.https://www.example.com/about/
).Bypassing the cache to allow a redirect when a request to a page is missing the trailing slash, as WordPress currently does by default, was introduced to the Cache Enabler plugin in version 1.2.3 and added to in 1.3.1.
WordPress topic: https://wordpress.org/support/topic/do-not-cache-redirect-pages/