redirecting a query string

#292132
  • Resolved Andrew
    Rank Math free

    Hi
    I’m struggling with this and hoping you can help. I’m not confident but i thinnk what I need would be referred to as redirecting a query string.

    I changed my domain from mallorcayachtsandproperty.com to yachtsandproperty.com and simply forwarded the old domain to the new one which is fine for the home page but only the home page.

    My site is full of listings so the string used to look like this

    mallorcayachtsandproperty.com/mallorca/….

    It now looks like this

    yachtsandproperty.com/listing/…

    So I need a universal rule with what I think would be referred to as a wildcard at the end to redirect all query strings for example:

    https://www.mallorcayachtsandproperty.com/mallorca/villa-sa-mata-grossa/

    should be forwarding to

    https://yachtsandproperty.com/listing/villa-sa-mata-grossa/

    Can you help ?

    Kind regards

    Andrew

Viewing 5 replies - 1 through 5 (of 5 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting us.

    Query strings or parameters are the values added after the ? in the URLs. Unfortunately, redirecting these URLs is not possible with Rank Math.

    However, in your case, it seems like you only wish to replace the domain and /mallorca/ with the new domain and /listing/.

    To do this, you can use Regex redirections. You can set up a redirection with the below values in https://www.mallorcayachtsandproperty.com/:

    Source: /mallorca/(.*)
    Type: RegEx
    Destination: https://yachtsandproperty.com/listing/$1

    Please let us know how that goes.

    Thank you.

    Andrew
    Rank Math free

    Thanks

    I tried to do that but I couldn’t make it work. The source domain is different to the destination domain. The source url box doesn’t give anywhere to add the domain. Could that be why I can’t get it to work ?

    Kind regards

    Andrew

    Prabhat
    Rank Math agency

    Hello,

    You do not need to add the domain in the source field since the domain in the source field is always the same as the current domain in which the redirection is created. The domain is required only in the destination field.

    Could you confirm if you added the redirections exactly as I mentioned in my previous reply and it is not working?

    Please ensure that you’re adding the redirection in https://www.mallorcayachtsandproperty.com/.

    Looking forward to hearing back from you.

    Thank you.

    Andrew
    Rank Math free

    Thats the problem. The source domain isnt my current domain. The source domain is my old domain. I recently changed it and need all the pages to redirect to the new site.
    Kind regards
    Andrew

    Hello,

    Redirects cannot be created under the destination URL.

    In this case, you may need WordPress and Rank Math installed on https://www.mallorcayachtsandproperty.com for Rank Math to handle the redirection.

    Else, you may need to get in touch with your web host to redirect all the URLs from that domain to https://yachtsandproperty.com

    I hope that helps.

    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 5 replies - 1 through 5 (of 5 total)

The ticket ‘redirecting a query string’ is closed to new replies.