• Resolved Evgeny Vlasenko

    (@mahnunchik)


    Wordpress have default redirect from URL without leading slash to URL containing leading slash.

    First request returns correct 301 redirect but second request returns cached HTML page without 301 status code.

    Static files (cached pages) served by Apache https://www.keycdn.com/support/wordpress-cache-enabler-plugin#advanced-configuration

    $ curl -i https://www.example.com/test-page
    
    HTTP/2 301
    
    x-redirect-by: WordPress
    location: https://www.example.com/test-page/
    
    <!doctype html>
    <meta charset="utf-8">
    <title>Document moved</title>
    <p>Document has <a href="https://www.example.com/test-page/">moved here</a>.</p>
    
    $ curl -i https://www.example.com/test-page
    
    HTTP/2 200
    
    <!doctype html>
    <meta charset="utf-8">
    <title>Document moved</title>
    <p>Document has <a href="https://www.example.com/test-page/">moved here</a>.</p>
    <!-- Cache Enabler by KeyCDN @ 14.04.2020 23:47:37 (html) -->

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    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. This issue in particular only occurred in certain cases and was related to the advanced cached settings file not being created. It has been fixed and will be released in our next version (1.4.0).

    GitHub issue: https://github.com/keycdn/cache-enabler/issues/85

Viewing 1 replies (of 1 total)

The topic ‘Do not cache redirect pages’ is closed to new replies.