Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've got an issue, writing a correct rewrite rule.

Basically, here are the examples of the url I want :


Then the same with pagination

Then, the basic page, with 2 params, no pagination

Then, the one with 2 parameters and the pagination

More or less, i have it working with differents rules for each case, but if I put them in a row, nothing works.

Here are the rules I wrote :

    'top' );

    'top' );

    'top' );
share|improve this question

1 Answer 1

up vote 5 down vote accepted

Your first two rewrite rules do not end with $, which indicates that the URL should stop there. So myPage/mySuPage/param1/param2/page/3 would still be matched by the first pattern, because it can just ignored the /page/3 part at the end. The next rewrite rules will then never be used.

With my Rewrite analyzer plugin I was able to simplify your rewrite rules to these two: one without params and just optional paging, and one with params and optional paging. Combining these two into one did not work because the optional params woud "eat" the paging part.


share|improve this answer
Wahou, thank you very much Jan. It works perfectly now. I didn't knew about the "optional". I'm using your plugin, but i guess this was too "complex" for me. – Ludo May 30 '11 at 10:01
@Ludo: Glad I could help! If this solved your problem, you can click the checkbox to mark the answer as accepted. This will also remove the question from the "unanswered" list. – Jan Fabry May 30 '11 at 10:15
is there a reason paged has an 's' on the end of it? – Manny Fleurmond Aug 18 '12 at 13:18
@MannyFleurmond: I think I just took the original rules from the question, and did not check the parameters. It is possible that pageds is a parameter that is handled by his own code. – Jan Fabry Aug 18 '12 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.