Regex Redirection Issue

#119398
  • Resolved Alnaqeeb
    Rank Math pro

    Hello,

    I have set a regex 301 redirect for all my AMP pages to a normal pages without /amp slug (screenshot in the sensitive data field).
    However, This is conflicting with some of my affiliates links which contains “amp” word. I have some affiliates URL’s for Ampforwp (www.siteurl.com/go/ampforwp) that’s now showing 404 error due to my RM regex rule.

    Please help in finding a solution… thank you in advance:)

Viewing 1 replies (of 1 total)
  • Hello,

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

    The screenshot you shared doesn’t load from my end and the URL only loads the ampforwp purchase page.

    If you are trying to redirect your amp URLs to your normal pages you can use the following redirect settings:

    
    Source: ^/(.*?)/\?amp=.*
    Target: /$1/
    

    The following is an example of the redirect: http://site.com/article/?amp=12 => http://site.com/article/

    If your AMP URLs don’t have the ?amp and are in the structure of http://site.com/article/amp/, you can redirect them as follows:

    
    Source: ^/(.*?)/amp/$
    Target: /$1/
    

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Regex Redirection Issue’ is closed to new replies.