List of WordPress 2.x Rewrite Rules & Usage Notes
By Angsuman Chakraborty, Gaea News NetworkSaturday, August 26, 2006
Comprehensive List of WordPress 2.x Rewrite Rules:
Note 1: The built-in rules are provided to guide you in writing your own fancy rules.
Note 2: In case you are wondering anything before and including the ‘?’ is ignored in match. The whole match is actually stored in a variable which is never used. So you can as well have your match starting with ‘?’. The current implementation of WordPress doesn’t care.
Note 3: WordPress rewrite rules infrastructure is sort of brain dead. What I mean is that you do all that fancy rewriting stuff without reaping much benefit at the end. You have to anyway add action to ‘template_redirect’ and redirect it to your hearts content. WordPress doesn’t do it for you unlike .htaccess. The whole infrastructure is to help WP developers and not you, the user. Actually it makes these rules harder to access for the end-users (bloggers). Also new rules are only updated when you manually update the permalink structure, unless you know the magic incantation
Match | Query |
index.php/(archives)/trackback/?$ | index.php?pagename=$matches[1]&tb=1 |
index.php/(archives)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?pagename=$matches[1]&feed=$matches[2] |
index.php/(archives)/(feed|rdf|rss|rss2|atom)/?$ | index.php?pagename=$matches[1]&feed=$matches[2] |
index.php/(archives)/page/?([0-9]{1,})/?$ | index.php?pagename=$matches[1]&paged=$matches[2] |
index.php/(archives)(/[0-9]+)?/?$ | index.php?pagename=$matches[1]&page=$matches[2] |
index.php/archives/attachment/([^/]+)/?$ | index.php?attachment=$matches[1] |
index.php/archives/attachment/([^/]+)/trackback/?$ | index.php?attachment=$matches[1]&tb=1 |
index.php/archives/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?attachment=$matches[1]&feed=$matches[2] |
index.php/archives/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ | index.php?attachment=$matches[1]&feed=$matches[2] |
index.php/(about)/trackback/?$ | index.php?pagename=$matches[1]&tb=1 |
index.php/(about)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?pagename=$matches[1]&feed=$matches[2] |
index.php/(about)/(feed|rdf|rss|rss2|atom)/?$ | index.php?pagename=$matches[1]&feed=$matches[2] |
index.php/(about)/page/?([0-9]{1,})/?$ | index.php?pagename=$matches[1]&paged=$matches[2] |
index.php/(about)(/[0-9]+)?/?$ | index.php?pagename=$matches[1]&page=$matches[2] |
index.php/about/attachment/([^/]+)/?$ | index.php?attachment=$matches[1] |
index.php/about/attachment/([^/]+)/trackback/?$ | index.php?attachment=$matches[1]&tb=1 |
index.php/about/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?attachment=$matches[1]&feed=$matches[2] |
index.php/about/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ | index.php?attachment=$matches[1]&feed=$matches[2] |
index.php/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?&feed=$matches[1] |
index.php/(feed|rdf|rss|rss2|atom)/?$ | index.php?&feed=$matches[1] |
index.php/page/?([0-9]{1,})/?$ | index.php?&paged=$matches[1] |
index.php/comments/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?&feed=$matches[1]&withcomments=1 |
index.php/comments/(feed|rdf|rss|rss2|atom)/?$ | index.php?&feed=$matches[1]&withcomments=1 |
index.php/comments/page/?([0-9]{1,})/?$ | index.php?&paged=$matches[1] |
index.php/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?s=$matches[1]&feed=$matches[2] |
index.php/search/(.+)/(feed|rdf|rss|rss2|atom)/?$ | index.php?s=$matches[1]&feed=$matches[2] |
index.php/search/(.+)/page/?([0-9]{1,})/?$ | index.php?s=$matches[1]&paged=$matches[2] |
index.php/search/(.+)/?$ | index.php?s=$matches[1] |
index.php/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$ | index.php?category_name=$matches[1]&feed=$matches[2] |
index.php/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$ | index.php?category_name=$matches[1]&feed=$matches[2] |
index.php/category/(.+?)/page/?([0-9]{1,})/?$ | index.php?category_name=$matches[1]&paged=$matches[2] |
index.php/category/(.+?)/?$ | index.php?category_name=$matches[1] |
August 28, 2006: 10:33 pm
[...] Angsuman published a “comprehensive list of WordPress 2.x rewrite rules.” [...] |
The WordPress Podcast · Episode 6: Akismet rumors, lots of new and updated plug-ins, listener mail