Tag name same as page name – redirect issue
-
I also have a TAG called “nebosh” (I do not generate amp pages for tags via settings) – when visiting the amp for I get redirected back to the page without amp. It’s a 302 redirect, I’ve checked all my redirect rules on my server and in software (I use Yoast) and I can confirm none of the rules are causing this cyclical redirect.
FYI I used a page and I have a tag “nebosh”, but no tag base!
I performed some tests and realised that in the wp-options database table, there’s a field called “rewrite_rules” which contains a number of amp replated rules; and this includes my TAG of “nebosh” that I also use within the rules – like this snippet from my table:
s:15:"(nebosh)/amp/?$";s:29:"index.php?amp&tag=$matches[1]";s:33:"(nebosh)/amp/page/?([0-9]{1,})/?$";s:47:"index.php?amp&tag=$matches[1]&paged=$matches[2]";
When I turn the option on to add amp to my TAGs and visit here: /amp/ I’m shown all posts with the “nebosh” tag.
If I add a TAG base url of sheilds.org/tag/ first, then visit sheilds.org/tag/nebosh/amp/ this page works and shows for tag related posts, but visiting sheilds.org/nebosh/amp/ also just shows the same TAG-related posts, not the individual page with an amp variant.
So I have identified an issue that if you have a tag with the same name as the landing url, this causes a problem and never shows the individual page, just the collection posts using that tag.
Any advice on how to fix this? seems like a coding issue to me.
The page I need help with: [log in to see the link]
- The topic ‘Tag name same as page name – redirect issue’ is closed to new replies.