Contact: Web / Voice / Email / Tips
Simple Thoughts Blog - Java and Web Technologies

Simple solutions for complex problems.

 

List of WordPress 2.x Rewrite Rules & Usage Notes

August 26th, 2006 by Angsuman Chakraborty

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]

Tags: CMS Software, Headline News, How To, PHP, Pro Blogging, Tech Note, Web, WordPress | | RSS 2.0 | Trackback this Article | Email this Article

You may also like to read

»How To Protect Linux Server From Stolen Zombie Netblocks & 100% Professional Spammer Controlled Netblocks
»WordPress Plugin: Angsuman's Referrer Bouncer
»WordPress 2.0.3 Released
»WordPress 2.0 - The Horror Story and How to Downgrade
»WordPress Automatic Machine Translator Plugin 2.0 Beta - Please Test
»How to Develop Rule Based Java Software Using Java Rule Engine API (JSR 94)
»Solving WordPress 1.5.1.2 Trackback and Pingback Sending Problems
»WordPress 1.5: My Referrer Bouncer Blacklist
»Why Your WordPress Blog Posting is Slow
»WordPress 2.x Hooks for Action - Comprehensive List for Plugin and Theme Developers
»List of Files Changed in WordPress 2.03 wrt. WordPress 2.02
»SEO Benefits of Translator Plugin Pro For Your WordPress Blog
»Medical Terms for WordPress Blacklist To Protect You From Most Drug Spams
»Switching Mailing List For Blogs
»WordPress Source Code Cross Reference w/ Commenting for Plugin / Theme / Code Developers

2 Responses to “List of WordPress 2.x Rewrite Rules & Usage Notes”

  1. MacManX.com | Blogroll Dive: 8/28/06 Says:

    [...] Angsuman published a “comprehensive list of WordPress 2.x rewrite rules.” [...]

  2. The WordPress Podcast · Episode 6: Akismet rumors, lots of new and updated plug-ins, listener mail Says:

    [...] A comprehensive list of WordPress 2.x Rewrite rules. [...]

Looking forward to hear your thoughts.



Please enter the code shown below ( to verify that you are human ) before you click Submit Comment.

No. 1 method to ethically increase your blog traffic and reach.

Translate

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanPřeložit do Čech/CzechOversætte hen til Dansk/DanishKääntää jotta Finnish/FinnishLefordít -hoz Magyar/HungarianÞýða til Íslenska/IcelandicTraducir a Latinoamericano Español/Latin American Spanishtagapagsalin sa Filipino/FilipinoTłumaczyć wobec Polski/PolishA traduce la spre Român/RomanianPrevesti za Srpski/Serbiantolmačiti v slovenski/SlovenianÖversätta till Svensk/SwedishChyfieitha at Cymraeg/Welshtercüme etmek -e doğru Türk/TurkishPrevesti to Hrvatski/CroatianПревеждам към Българин/BulgarianTraduzca al Español/SpanishTraduisez au Français/FrenchTraduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplifiedترجمة الى العربية/ArabicVertaal aan het Nederlands/DutchΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/Norwegian中文翻译/Chinese TraditionalTraduzir a Língua portuguesa brasileira/Brazilian PortugueseReddo ut Latin/Latin

Taragana Network

»Ctrl-S
»Enterprise Blog
»Free Book on Eye Care by Natural Therapy
»Health Care Blog
»Hot Computer Jobs Blog
»Pet Care & Grooming News and Tips
»Phil Law Blog
»Taragana - Software Outsourcing
»The Angsuman Chakraborty Blog
»The Diabetes Cure Blog
»The Eye Treatment Blog
»The Stem Cell Blog
»Weblog Hosting Blog
"The fear of death is the most unjustified of all fears, for there's no risk of accident for someone who's dead." - Albert Einstein