• Resolved holihouse

    (@holihouse)


    Hi!

    I am using the redirection plugin for wp.

    I am trying to match multiple keywords to redirect to the same url. For example I want to redirect to https:google.com both from example.com/test0 and example.com/test1. Assuming that there is no pattern in the keywords, ideally I would like to do this without adding two separate entries, rather with an OR expression.

    Is this possible and what does the Match in the db should look like?

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author iClyde

    (@iclyde)

    Hi @holihouse

    It is possible to do that via RegExp redirection.

    Let me show you example for these pages:
    – example.com/test0
    – example.com/test1
    – example.com/test2
    – example.com/test3
    – example.com/test10

    https\:\/\/example\.com\/(test10|test0|test1|test2|test3)
    – Order is not random there.

    You can use RegExp in “Redirection Rules” under “Regex matches”

    Let me know if that resolves your issue ??
    Thank you!

    Thread Starter holihouse

    (@holihouse)

    Hi iClyde!

    Thank you so much for your input!

    I was looking to do it via the “match” column in the database table. Do you know if it’s possible there?

    Thanks!

    Plugin Author iClyde

    (@iclyde)

    Hi @holihouse

    Above solution is most optimized for large amount of redirections, you can also create patterns there to save even more text space.

    Match column is only used for simple redirections, for RegExp it will be empty and that rule is saved in meta data.

    If you really want, you can use match with simple redirection and create bulk SQL command to insert all redirections, but it’s overkill if you would ask me.

    Let me know if you need further help regarding RegExp creation ??
    Thank you!

    Thread Starter holihouse

    (@holihouse)

    Thanks iClide. Is this the from column you are referring to?

    Also, is there a way to ignore case for all entries globally, or I necessarily need a separate meta entry for each match?

    Plugin Author iClyde

    (@iclyde)

    Hi @holihouse

    You need meta entry, but most URLs in WordPress should be lower-cased by default, I believe it does not make any difference as slugs are case-insensitive.

    I refer to “match” column you mentioned in your previous post.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Match multiple keywords’ is closed to new replies.