Custom URL rewrites work, but break my permalinks

I’m doing custom URL rewrites according to this method , which work beautifully. But as a result my regular post permalinks are broken.

So, I’m rewriting “/pagename/1232432” into “/pagename?param=1232432” like this:

Read More
    $wp_rewrite->add_rewrite_tag( $rewrite_tag, '(.+)', 'param=' );
    $rewrite_keywords_structure = $wp_rewrite->root . "%pagename%/$rewrite_tag/";

(plus all the surrounding code from the example in the link above). Works fine. However, my normal posts like “/2011/03/hello-world/” no longer work.

Any ideas?

Cheers
MickP

Related posts

Leave a Reply

2 comments

  1. Well I solved it – in a rather unsatisfactory way – by explicitly re-defining the default posts rule in my own code. i.e.

    $rewrite_keywords_structure = $wp_rewrite->root."/%year%/%monthnum%/%postname%/";
    ..etc..
    

    I don’t really understand why this is necessary, but there you go.