• uisneach

    (@uisneach)


    I am using add_rewrite_rule on my website to redirect urls that look something like this
    https://domain.com/customslug --> index.php?pagename=my-custom-page&customslug=$matches[1]
    I do have an equivalent page created in WordPress to handle this:
    https://domain.com/my-custom-page
    This approach allows me to have Virtual/fake pages on my site and it works well.

    WP Super Cache caches all other pages on the site but not a request that passed through the redirect rule. Does it not support this approach?
    I have tried accessing the page on a browser where I’m not logged in and also clicked on the ‘regenerate stats’ link.
    It will cache
    https://domain.com/my-custom-page
    but not
    https://domain.com/customslug

Viewing 1 replies (of 1 total)
  • Sa?a

    (@stodorovic)

    It should work but it’s possible to WPSC can’t detect “page type”. You should check in query monitor these conditionals: is_singular() and is_page() when you open this page (customslug). Also, it’s helpful to you enable debugging log in WPSC/Debug (You will see more details why it’s happening).

    If URL contains index.php then caching is rejected (by default). I’m not sure that’s this case, but it’s a possibility.

Viewing 1 replies (of 1 total)
  • The topic ‘Caching virtual pages’ is closed to new replies.