Regex 301 Redirects + 1 Million Songs

#585615
  • Resolved Anonymous
    Rank Math free

    Hey all,

    I am moving an application site currently built on Drupal to a subdomain and rebuilding the brochureware portion of the site on WordPress. This application site allows users to search for songs to license and then integrate with a custom CRM that creates a ticket for them to process.

    The application currently has 1 million or so songs housed within the CRM (I believe, I do not see them on the Drupal site). On the off chance that someone doesn’t search via the application and goes directly to the URL or even Google, I need to set up 301 redirects that go directly to that page on Drupal.

    Current URL in Drupal: http://www.sitename.com/license/song/detail/123456

    New URL moving Drupal to a subdomain: app.sitename.com/license/song/detail/123456

    I was hoping to set up a 301 Regex Redirect that no matter what the # of the song is, it will redirect to that subdomain using that same URL structure but with app. in front of it.

    So if it’s /license/song/detail/789433 the 301 Redirect to – app.sitename.com/license/song/detail/789433

    I tried just using * and ? but those didn’t seem to work. Thoughts?

    Thanks in advance,

    Jason

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    Using Rank Math’s regex redirect, you can set them on the source site with this structure to capture any numbers

    Source: license/song/detail/(.*)
    Type: Regex
    Destination: app.sitename.com/license/song/detail/$1

    And here’s how you can create regex redirects:
    https://rankmath.com/kb/how-to-use-regex-redirects/

    Hope that helps.

    Thank you.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Figured it out!

    I put a / so it was /license/song/detail/(.*) and it needed to be license/song/detail/(.*).

    Works just fine!

    Thank you!

    Anonymous
    Rank Math free

    Marking as resolved!

    Hello,

    We are glad to hear that this issue has been resolved. Thank you for letting us know. This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Regex 301 Redirects + 1 Million Songs’ is closed to new replies.