WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Regexp help please (7 posts)

  1. lisegirl
    Member
    Posted 2 years ago #

    i do love the plugin, but i am at total loss about the regexp. i bever learned how to use it. and as i dont think i will ever need it again i will ask you guys/girls to help me out.

    the incomming urls are like: /boek/364_title
    my redirect that i would need to output to the plugin is simply: ?p=364
    what should i fill in both the fields?

    please help me!

    http://wordpress.org/extend/plugins/redirection/

  2. biswajeet
    Member
    Posted 2 years ago #

    Hi, if I understand correctly then for your incoming link - /boek/364_title and you want to redirect to link - /boek/364_title?p=364, then you do as follows -

    Source URL: /boek/364_title
    Target URL: /boek/364_title?p=364

    other option are left with default

    hope that will make it work!

  3. lisegirl
    Member
    Posted 2 years ago #

    the complete strutcure of my site changes biswajeet.
    i had about 800 links /boek/<number>_<title> (used to be drupal structure)
    and now i have wordpress... the easiest is to use the shortlinks for this redirect which would become /?p=<number> thats why i was asking for help with the regexp for that piece...

    grtz. lise

  4. biswajeet
    Member
    Posted 2 years ago #

    your syntax: /boek/<number>_<title> => /?p=<number>

    can you try with this -

    Source URL: /boek/\d+
    Target URL: /?p=$1

    Let me know the result...

  5. lisegirl
    Member
    Posted 2 years ago #

    i am afraid is still gives a 404...

  6. biswajeet
    Member
    Posted 2 years ago #

    Will have to check in more details...
    But for the un friendly url structure like (/?p=) you need to put clean url setting OFF in WP permalink setting.

  7. lisegirl
    Member
    Posted 2 years ago #

    thats not the problem, the shortlink works, even with pretty urls on. with what you wrote, it didnt rewrite the url at all, so maybe it didnt trap it correctly?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic