[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

[Rank Math SEO Plugin] Bulk Redirection Error


riadmukul
 Share

Recommended Posts

I am a new user of rank math seo plugin. Recently I have deactivated the AMP plugin from my WordPress blog and to redirect all my amp URL to existing original post URL I used some code in your seo plugin I put an image of it. now whenever I want to save the code then the code saved in a different format. as a result all my amp urls aren't redirect to original posts. Please put a look into it. I will be very Happy. By the way your plugin is excellent. You guys have done an wonderful job. My wishes are always with you. Thank you in advance.

47684962_2203346286364706_36519507297503

Link to comment
Share on other sites

  • Support

Hello,

Thank you for contacting MyThemeShop and sorry for any inconvenience that might have been caused due to that.

Rank Math requires delimiters for the regex pattern, and if they are missing [ ] gets added automatically. http://php.net/manual/en/regexp.reference.delimiters.php. I see an extra backslash is added, and that might be the reason why redirection is not working. I've forwarded this issue to our development team and they will further debug this issue and fix it in the future release of the plugin.

For now, to redirect AMP pages to its original post, please add below code to Dashboard >> Rank Math >> General Settings >> Edit .htaccess: https://mythemeshop.d.pr/p8exMe

# Redirect from AMP to non-AMP path
RewriteEngine On
RewriteCond %{REQUEST_URI} (.+)/amp(.*)$
RewriteCond %{REQUEST_URI} !^/wp-content/(.*)$ 
RewriteRule ^ %1/ [R=301,L]

Hope that helps. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...