WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirect with regular expression (3 posts)

  1. smeyer012
    Member
    Posted 1 year ago #

    I am trying to set regular expressions so that any link with a base url of "http://www.domain.com/workshops/" will redirect to "http://www.domain.com/education/workshops/"

    For instance:
    http://www.domain.com/workshops/details/?workshop=1
    should redirect to
    http://www.domain.com/education/workshops/

    I've tried entering "http://www.domain.com/workshops/(.*)" as the source URL with the regular expressions box checked and I get an infinite loop within the URL that it's being redirected to.

    What am I doing wrong?

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

  2. smeyer012
    Member
    Posted 1 year ago #

    Just for grins, I tried "http://www.domain.com/workshops/" as the source URL (no regex's within the url) with the "Regex" checkbox checked, and I get the loop issue.

    I also tried "http://www.domain.com/workshops/(.*)" as the source URL without the "regex" checkbox checked which would still redirect "http://www.domain.com/workshops/" to "http://www.domain.com/education/workshops/" but doesn't work for a link with anything after "workshops/"

    Is there a problem with the regex checkbox functionality?

  3. RoamFree
    Member
    Posted 1 year ago #

    Try "/workshops/(.*)" or "^/workshops/(.*)"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic