WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirect all URLs under one directory (7 posts)

  1. gumbotron
    Member
    Posted 2 years ago #

    I've been using the Redirection plugin for my site and it's wonderful! I have one question, however - how could I use regex (or other method) to redirect all URLs that are below a certain directory to a page?

    For instance, I'd like for anyone not logged in that tries to access http://mydomain.com/documentation/ or /documentation/phonenumbers or /documentation/tech/office (anything after /documentation) to redirect to a login/registration page.

    I've tried /documentation/* and looked through some basic documentation for regex but it's still not clear to me. I have 45+ pages to redirect and doing it manually for each page, while doable, is a daunting task.

    Thanks.

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

  2. gumbotron
    Member
    Posted 2 years ago #

    I managed to find the solution in another forum. Matter of fact, within 3 hours I had a dozen awesome people offer far too many solutions and I had to pick from all of those! Google will show you, it's not anywhere in here that I could find.

  3. Ed
    Member
    Posted 2 years ago #

    Would you mind sharing it? Same issue here...

  4. newyorkcity
    Member
    Posted 2 years ago #

    whats the answer? and forum?

  5. markatlarge
    Member
    Posted 2 years ago #

    I have this issue too. Can you let me know how to do this?

  6. newyorkcity
    Member
    Posted 2 years ago #

    whats the solution?

  7. gumbotron
    Member
    Posted 2 years ago #

    From wading through post after post of people begging for this on this forum, it's pretty clear to me that this forum and the developer of the plugin both feel that you must learn the painful and difficult world of RegEx in order to do even the simplest redirection so I don't want to give it away here. Any link I post will most likely be removed (and my account penalized) by the spam filter, so I will just tell you to search G for "put me out of my regexing misery" and it's the first result.

    I marked the answer that solved my problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic