Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi s.r.,

    Not sure if this helps, but here’s the Redirection plugin documentation page with a few examples:

    https://urbangiraffe.com/plugins/redirection/

    If you do find the solution, please could you post it? I’m going to have a play when I have a bit of time. I’m sure it would be useful.

    Cheers,

    Zain

    Thread Starter AlexReds

    (@sr-2)

    ZainB that’s actually the plugin I am using, and we are talking now in the plugin’s support forum ??

    The plugin is indeed useful! I like it. You can redirect there pretty much whatever you want.
    However for those, like me, who doesn’t understand REgExes some scenarios a bit difficult.

    For time being I end up using global regex post.php(.*)
    It’s not what wanted and I needed but at least I don’t get dozens of 404 erros..

    Hi s.r.

    I’m not a regex wiz (I just know a little bit). Here’s what I came up with which seems to work. I hope it may help someone out (or even me in future!).

    *Note: Remember to make sure that the Regex checkbox is ticked.

    Source:
    /post.php\?lg=eng&id=(\d+)

    Target:
    /courses/

    Note the use of the parentheses (\d+). The \? helps to escape the question mark, as it’s a special character.

    This will replace:

    /post.php?lg=eng&id=35
    /post.php?lg=eng&id=36
    /post.php?lg=eng&id=45

    and point them ALL to the /courses/ page.

    ===============
    Alternate Useful Regex
    How to redirect your URLs to a string, followed by an ID.

    Source:
    /post.php\?lg=eng&id=[\d+]

    (Note the use of the brackets at the end [\d+] )

    Target:
    /courses/

    This will replace:

    /post.php?lg=eng&id=35
    /post.php?lg=eng&id=36
    /post.php?lg=eng&id=45

    and point them to:
    /courses/35/
    /courses/36/
    /courses/45/

    I hope that helps. If anyone else can add anything, or suggest a better way, that would be great.

    Cheers,

    Zain

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect hundreds old pages to just only new one page’ is closed to new replies.