Community Forums › Forums › Archived Forums › General Discussion › Bizarre Post Redirection
Tagged: redirection
- This topic has 11 replies, 3 voices, and was last updated 8 years, 11 months ago by bionary.
-
AuthorPosts
-
January 1, 2016 at 12:55 pm #175335bionaryMember
To my chagrin, I noticed that a few of my posts are redirecting to posts with similar urls. At first I though it was an .htaccess directive but I looked into it and it is not. (that would have been too easy of course!)
For example: http://helloartsy.com/how-to-draw-a-cone
redirects to: http://helloartsy.com/how-to-draw-a-cone-video/but you can see the url change when to page first loads so I'm thinking it has to do with wordpress itself?
This is really weird...any ideas?
I'm running genesis:beautiful theme
Thanks
http://helloartsy.comJanuary 2, 2016 at 8:10 am #175382Victor FontModeratorIf you take a look at the first URL at http://redirectdetective.com/, it is reporting a 301 Permanent Redirect to the second URL. 301 redirects are created either by plugins or directives in htaccess.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 2, 2016 at 8:58 am #175384bionaryMemberThat's a good tool, thanks Victor.
Here's where things get really weird which leads me to believe this is happening inside WP and not .htaccess.
If I change the url of the final destination (ie: helloartsy.com/abc) ... it still gets redirected there.
This is very weird.January 2, 2016 at 9:06 am #175386bionaryMemberI just figured out EXACTLY what wordpress is doing but I'm not sure how to fix it.
WordPress is automatically redirecting all urls (slugs) that where changed.
For example if I had a post called: site.com/abc and later changed it to site.com/123 visiting site.com/abc will automatically redirect (301) to the new url: site.com/123.The problem is wp is not smart enough to realize when another post is made using the old slug and NOT do the redirect.
My url: helloartsy.com/how-to-draw-a-cone-video used to be named: helloartsy.com/how-to-draw-a-cone
How on earth do I fix this?
January 2, 2016 at 9:55 am #175387Victor FontModeratorWordPress Ver. 2.3 introduced a feature called canonical URLS. The goal was to make WordPress automatically redirect requests to the correct (canonical) URL for that resource. You can disable this by adding
remove_filter('template_redirect', 'redirect_canonical');
to your functions.php.You could also try resaving your permalinks. I don't know if either of these will help, but it won't hurt to try.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 2, 2016 at 9:59 am #175388bionaryMemberI just tried resaving each url and that doesn't work. The removing filter seems like the nuclear option as it will destroy all the good effects of this "feature" and will probably break many links.
January 2, 2016 at 10:08 am #175389ChristophMemberHi,
this is a bug in WordPress.
https://core.trac.wordpress.org/ticket/35031
It is scheduled to be fixed in WordPress 4.4.1.
January 2, 2016 at 10:11 am #175390bionaryMemberwow, impressive Chris. Do the say when that will be released?
January 2, 2016 at 10:14 am #175392ChristophMemberI believe the plan is for the middle/end of the coming week.
January 2, 2016 at 10:15 am #175394bionaryMembercool, I'll just wait it out.
Thank you.(that is a very destructive bug on my site...as I had changed many slugs early on)
January 2, 2016 at 10:22 am #175399ChristophMemberIf you don't want to wait, you could manually add the changes to /wp-includes/query.php into your WordPress installation:
https://core.trac.wordpress.org/changeset/36129
January 2, 2016 at 10:23 am #175400bionaryMemberThanks!
-
AuthorPosts
- The topic ‘Bizarre Post Redirection’ is closed to new replies.