WordPress.org

Ready to get started?Download WordPress

Forums

Help with Redirection Plug-in (2 posts)

  1. d4jaj1
    Member
    Posted 4 years ago #

    Hello,

    I'm having a problem using redirection on a sub-directory. In short, I need to redirect only pages just off of the primary root. For example, I'm currently using the following redirection string:

    Source URL: /page/.*
    Target URL: http://www.domain.com/
    HTTP Code: 301
    Regex: Checked

    In this example, http://www.domain.com/page/3/ is redirected to http://www.domain.com - which is exactly what I want. The problem is - the following URL generates a 404 error:

    http://www.domain.com/category/name/page/2/

    I've tried explicitly entering http://www.domain.com/page/.* into the source field, but the plug-in removes the domain.

    How do I only redirect URL with "Page" in the string if it's just after the root domain - but not in cases where it's further down the line - like in categories?

    Using WP 2.9.1 and Redirection 2.1.24

  2. Kudama
    Member
    Posted 4 years ago #

    I'm having exactly the same problem with this plugin using exactly the same syntax. What this appears to do is change the URL from

    http://domain.com/category/name/page/2/

    to

    http://domain.com/category/name/page/http://domain.com/

    Which of course sends the user to a 404.

    I don't want the redirection messing with any of the URLs other than:

    http://domain.com/page/2 <= and any number here

    Which is exactly what the thread starter described. Are we doing something wrong with regular expressions or is this a bug with the redirection plugin?

    I have also tried:

    Source URL: /page/(\d*)
    Target URL: http://www.domain.com/
    HTTP Code: 301
    Regex: Checked

    And:

    Source URL: /page/(\d*)
    Target URL: /
    HTTP Code: 301
    Regex: Checked

    No luck. Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic