Skip to content

Visiting a post permalink directly tries to redirect it #7

Description

@JJJ

When visiting a post permalink directly, it tries to redirect to the actual URL for the post rather than just the slug. This breaks the app in a weird way, because WordPress rewrite rules don't match the Vue routes.

I.E. Visiting
src.wordpress-develop.dev/hello-world
...tries to redirect to...
src.wordpress-develop.dev/2016/11/21/hello-world
...and then you're presented with a blank page.

Recommend to add this to functions.php so post-permalinks don't try to redirect:

add_filter( 'redirect_canonical', '__return_false' );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions