• I am not sure what is going wrong, I think it is a conflict of rules of some sort. I am trying to add a rewrite rule so that i can have clean urls. When i add this rule:

    ‘explorec/([^/]+)/?$’ => ‘index.php?pagename=explorec&city=$matches[1]’

    this rule works fine. Clean and passes the new variable “city” but when i add two variables i get 404 error. The following rewrite rule gives me a 404 error.

    ‘explorec/([^/]+)/([^/]+)?$’ => ‘index.php?pagename=explorec&city=$matches[1]&zip=$matches[2]’

    The above gives the error. Can someone explain to me why the first example with one variable works fine and the one with two doesn’t work. Also if someone can offer me a solution, that would be great. Thank you so much.

    I also am using add_query_vars to accomplish the add_rewrite_rules. I also have my permalinks set to postname.

  • The topic ‘Add Rewrite Rules’ is closed to new replies.