-
I got several 404’s from urls I had proper 301 redirection in vhost of Apache2. Same happened when I was trying .htaccess. Again, the issue is syntax that Rank Math is offering. And we have somekind loose-loose situation here.
Rank Math shows 404s like ^foo/bar$ but because of permalinks of WordPress incoming link is actually DOMAIN/foo/bar/ with ending slash. The offered is also without slash this way: RewriteRule ^foo/bar$ https://example.com/something/ [R=301,L]
Because of permalink structure, Google has all indexed urls _with_ ending slash but redirect rule works only when asked url is _without_ ending slash.
So, redirects work mainly with humans (and links) where slash is not used, but never with indexing bots.
And now to loose-loose situation. If a redirect rule is ^foo/bar/$ as it should be, then everything else is redirected (like indexing bots), but humans who don’t use ending slash.
This is not a bug but very close. The first solution is change $ to /$ because Redirection of Rank Math is now totally useless unless used from database (and that’s not very smart). The second one is give a hint of incoming url to a webmaster who makes the choice to use or not to use /$.
The ticket ‘Redirections by server side don’t redirect’ is closed to new replies.