I believe you could just call the paged add_rewrite_url
last so that it is checked first. Otherwise the paged version will never get any match, since the non-paged one will always match first. Should also work if you remove ‘top’ from your arguments.
Also, check out this page for a nice way of debugging those 404 when working with custom rewrite:
http://www.dev4press.com/2012/tutorials/wordpress/practical/debug-wordpress-rewrite-rules-matching/
Related Posts:
- Change the “page” slug in pagination
- Disable wordpress pagination URL rewrite for specific page
- Remove “/page/1” from the URL
- Disable Pagination on Pages
- Changed pagination URLS to use p= instead of paged=
- Adding a rewrite rule to page that has no fixed variables and pagination
- Why is a rewrite rule in wordpress prevent pagination?
- Wrong rewrite rules
- How do you create a “virtual” page in WordPress
- Rewrite rules not working in WordPress
- Need help with rewrite_rules_array
- Why does wordpress still strip my query var?
- When to call `add_rewrite_rule` for safety
- URL rewrites and pagination
- Rewrite rules goes away
- Rewrite Rule for Custom Page with Query Vars in URL
- Sorting archive pages with “pretty” URLs?
- add_rewrite_rule again
- Rewrite Rule for Post “Subpage”, with pagination
- Need to make a php file inside theme accessible via url
- WP Rewrite the last two parts of the URL
- Rewrite loading custom template file but is_home() returns true, and there’s no 404
- Rewrite rule for admin-ajax.php
- Evaluating a external rewrite rule before internal wordpress rewrite rule
- Access $_POST data after redirect
- WordPress removes spaces in URL on pagination
- Change Query String to pretty permalink
- add_rewrite_rule not working for language specific characters
- How to add a custom redirect rule for subdomains?
- Custom rewrite rule
- How to remove WordPress category from URL and have a custom pagination parameter/rewrite?
- Single Redirection Rule for Pages and Archive links
- Is it possible to remove feeds from rewrites?
- Flush Rewrite Rules on init or rest_api_init?
- Rewrite URL – insert custom variables as a directory path
- How to properly rewrite url by custom var
- Can’t add external rewrites
- url rewrite parsing a custom url parameter not working
- How to add custom variable in url without redirect?
- Using category slug in add_rewrite rule
- add_rewrite_rule ignoring other params than the “p” param
- How to catch Rewrite rules then display a specific post?
- Adding two rewrite rules
- Load an url with minimal/no DB queries
- How to building pretty URLs to reflect category hierarchy?
- Monkey Man Rewrite Analyzer says my rule will trigger but it doesn’t [closed]
- .htaccess rewrite
- Need to add rewrite rule that adds in additional information about the post to url
- Auto generate rewrite rules for multiple taxonomies
- add_rewrite_rule is redirecting instead of rewriting url
- Help with Rewrite Rule for Custom Post Type with Query String
- Rewrite URLs – Custom Post Type – Post Slug, Taxonamy Slug
- URL Rewriting for PHP script on an image URL
- Create Dynamic SEO Friendly URL for Virtual Page
- add_rewrite_rule with query variables
- Custom Rewrite rule to captured post (rewrite rule to rewrite rule)
- Rewrite query string to path
- Rewrite API -Adding a parameter before the slug
- Help with rewrite rules for two post types
- How to pass url as a parameter in a add_rewrite_rule
- Per Page Permalink Structure for Page Post Type
- Customise particular RSS permalink
- Rewrites rules disappear after a while
- Flush rewrite rules on option update with Settings API
- Localize URL bases
- Not able to rewrite the pagination URL for the posts
- Rewrite specific action url
- Using URL rewrite to add custom URL for custom post type
- WordPress simple Url Rewrite
- Custom rewrite rule not working
- Rewriting in wordpress url
- Add pagination to a template loaded by query variable
- Pagination for custom post types – url rewriting
- Rewrite custom taxonomy slug – but only parent items
- How can I allow trailing slashes on some URLs without a redirect, but not on others?
- Adding the amp url prefix to the beginning
- wordpress path generation from rewrite rule
- Rewrite WordPress Url from root to subfolder without moving files
- WordPress pagination broken for page 2,3 with custom permalink. Redirects to baseurl
- Ugly URLs when there’s pagination
- How do I rewrite URL that has custom parameter
- Why is there a 404 on page 2+ for my search page?
- Rewrite rule for post as a child of a CPT
- Broken page redirect
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- add_rewrite Rule
- .htaccess RewriteBase equivalent for WordPress – Passing a URL as a variable without getting a 404
- URL Rewrite for CPT single posts
- Migration from old CMS to WordPress 301 redirection rules?
- How to make a custom route with any-string-part/number-part pointing to an existing page?
- Using add_rewrite_tag to create urls for page sections
- Rewriting WordPress URLs
- Can’t get pretty permalinks to work without index.php
- Programmatically add a custom url route “/category/index.json” to return a collection of posts in json
- Rewrite URLs in a Custom Post Type with Multiple Taxonomies
- Rewrite rule giving 404 error
- WordPress picks a wrong template if ?cat= is used as URL parameter
- WP-Include rewrite directory
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?
- How to combine nearly identical custom rewrite rules for WordPress