Title: problem with wp_rewrite
Last modified: August 20, 2016

---

# problem with wp_rewrite

 *  Resolved [macleodjb](https://wordpress.org/support/users/macleodjb/)
 * (@macleodjb)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/problem-with-wp_rewrite/)
 * I’ve got an issue i can’t wrap my head around. I am using wp_rewrite to set up
   some custom rewrite rules. I’m using the following rule
 * $newrules[‘^mybasetag/([-A-Za-z0-9])$’] = ‘index.php?pagename=$matches[1]&kw=
   $matches[2]’;
 * It seems to be mostly working fine. i can go to [http://mysite.com/mybasetag/123](http://mysite.com/mybasetag/123)
   and everything works fine. If i switch the 123 at the end of the url to anything
   non-numeric the page fails. I’m not sure what I am doing wrong? Can anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [macleodjb](https://wordpress.org/support/users/macleodjb/)
 * (@macleodjb)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/problem-with-wp_rewrite/#post-2478067)
 * I’ve figured out that it a 1 character limit after mybasetag. So i can put a 
   letter after mybasetag but only 1, if i put 2 it throws a 404. Any help?
 *  Thread Starter [macleodjb](https://wordpress.org/support/users/macleodjb/)
 * (@macleodjb)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/problem-with-wp_rewrite/#post-2478160)
 * Any help?
 *  Thread Starter [macleodjb](https://wordpress.org/support/users/macleodjb/)
 * (@macleodjb)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/problem-with-wp_rewrite/#post-2478192)
 * Does this forum offer any help?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘problem with wp_rewrite’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 1 participant
 * Last reply from: [macleodjb](https://wordpress.org/support/users/macleodjb/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/problem-with-wp_rewrite/#post-2478192)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
