• Resolved rfletcher73

    (@rfletcher73)


    Greetings!

    I am running into an issue with 301 Redirects plugin where it is creating a redirect chain. I am seeing additional hops that are unnecessary in my opinion.

    This occurs with a custom post type on my site.
    I initialize my post types on the init action hook.

    For my example below, let’s say i need a redirect from /movies/test to /movies/something-else/ and something-else post has post id 12345.

    Our admins add the redirect into the plugin by selecting the page from select menu. We are not using custom urls.

    Let me describe the hops I see in the network tab.

    Hop #1: test/ – Status: 301
    Hop #2: ?p=12345 – Status: 301
    Hop #3: something-else – Status: 301
    Hop #4: something-else/ – Status: 200

    What I’d like to do is get rid of the? p=12345 hop as this is not needed. The plugin should get the permalink from the post id and redirect to that.

    What do you think is going on here and how might I be able to correct this issue?

    Other plugins I have installed that might conflict are Yoast SEO.

Viewing 1 replies (of 1 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    Hi,

    If you select the page from the dropdown the it will redirect to that page ID, then WordPress takes over and redirects according to the Permalink Settings and then again to add the trailing slash I guess. Not sure why it’s doing the trailing slash separately though.

    The reason 301 Redirects is not redirecting directly to the permalink is that browsers cache 301 redirects and if you change the permalink structure you could end up redirected to a 404.

    If you are sure the page URL will not change, just use a Custom URL for the redirect and set it directly to that ??

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.