Support » Plugin: Redirection » Which fields to use for regular expression redirection

  • dleigh

    (@dleigh)


    Hi,
    I’ve looked here: https://urbangiraffe.com/plugins/redirection/ and the examples are not clear for me as to which fields to use when creating a regular expression redirection.

    For instance with this example from the docs:

    /blog/(.*) => /$1

    Do you put that whole string in the Source URL?
    If so, what do you put in the Target URL?

    If not do you split it like this?

    Source: /blog/(.*)
    Target: /$1

    And in those cases, what about everything before and after (the “^” and the “$”)?

    Thanks for helping to clear that up.

Viewing 1 replies (of 1 total)
  • mostman

    (@mostman)

    This would be correct
    Source: /blog/(.*)
    Target: /$1

    Not sure if this answer your question…
    Everything before is not necessary to specify (i.e. http://www.site.com)
    $1 is a parameter which takes everthing after “/blog/” and add it to the new url.

Viewing 1 replies (of 1 total)
  • The topic ‘Which fields to use for regular expression redirection’ is closed to new replies.