Title: Help with Redirection Plug-in
Last modified: August 19, 2016

---

# Help with Redirection Plug-in

 *  [d4jaj1](https://wordpress.org/support/users/d4jaj1/)
 * (@d4jaj1)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/help-with-redirection-plug-in/)
 * 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://www.domain.com/)
   HTTP Code: 301 Regex: Checked
 * In this example, [http://www.domain.com/page/3/](http://www.domain.com/page/3/)
   is redirected to [http://www.domain.com](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/](http://www.domain.com/category/name/page/2/)
 * I’ve tried explicitly entering [http://www.domain.com/page/.*](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

Viewing 1 replies (of 1 total)

 *  [Kudama](https://wordpress.org/support/users/kudama/)
 * (@kudama)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/help-with-redirection-plug-in/#post-1340417)
 * 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/](http://domain.com/category/name/page/2/)
 * to
 * [http://domain.com/category/name/page/http://domain.com/](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](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://www.domain.com/)
   HTTP Code: 301 Regex: Checked
 * And:
 * Source URL: /page/(\d*)
    Target URL: **/** HTTP Code: 301 Regex: Checked
 * No luck. Any ideas?

Viewing 1 replies (of 1 total)

The topic ‘Help with Redirection Plug-in’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Kudama](https://wordpress.org/support/users/kudama/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/help-with-redirection-plug-in/#post-1340417)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
