Skip to content

PurgeUrl purges with trailing slash, but my permalinks have no trailing slash = no purge #124

Closed
@Paike

Description

@Paike

Hi,
my site does not use trailing slashes in the permalinks. In purger.php line 208 it hard codes a trailingslash to the url. So in my setup the cached pages are not purged. Full purge does not work either.

When you open the purge-url in browser with and without trailing slash, the key and path will be different.
(https://example.com/purge/page/ and https://example.com/purge/page)

When I remove trailingslashit() the pages were purged correctly.

function purgeUrl( $url, $feed = true ) {
    global $rt_wp_nginx_helper;
    $url = trailingslashit( $url );
    $this->log( "- Purging URL | " . $url );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions