RewriteEngine On RewriteBase / # be sure to make this file non-writable by WP # or use Jerome's wp-compat.php # feeds RewriteRule ^rss2.xml feed.php [L] RewriteRule ^atom.xml feed.php?feed=atom [L] RewriteRule ^sitemap.xml sitemap.php?sitemap=1 [QSA,L] RewriteRule ^sitemap_index.xml sitemap.php [L] # category feeds RewriteRule ^category/([^/]+)/rss2.xml$ feed.php?c=$1 [QSA,L] RewriteRule ^category/([^/]+)/atom.xml$ feed.php?c=$1&feed=atom [QSA,L] RewriteRule ^category/([^/]+)/sitemap.xml$ sitemap.php?c=$1&sitemap=1 [QSA,L] # archives sitemaps RewriteRule ^archives/([0-9]{4})/([0-9]{2})/sitemap.xml$ feed.php?y=$1&m=$2&feed=sitemap&sitemap=1 [QSA,L] # feeds (WP compatibility) RewriteRule ^wp-atom.php feed.php [L] RewriteRule ^wp-rss.php feed.php [L] RewriteRule ^wp-rss2.php feed.php [L] # match with the 'post_prefix' option in config.php # # for 'post_prefix' set to 'archive/%Y/%m/post-name' use # RewriteRule ^archive/([0-9]{4})/([0-9]{2})/([^\.]+)/?$ index.php?p=$1 [QSA,L] # and if you also have 'post_suffix' set to '.html' use # RewriteRule ^archive/([0-9]{4})/([0-9]{2})/([^\.]+)\.html$ index.php?p=$1 [QSA,L] # # this is for a plain 'post_prefix' set to 'post' RewriteRule ^post/([^/]+)/?$ index.php?p=$1 [QSA,L] # as for post, match this with the 'archive_prefix' option in config.php RewriteRule ^archives/([0-9]{4})/([0-9]{2})/record/?([0-9]*)/?$ index.php?y=$1&m=$2&i=$3 [QSA,L] RewriteRule ^archives/([0-9]{4})/([0-9]{2})/?$ index.php?y=$1&m=$2 [QSA,L] RewriteRule ^search/?$ index.php [QSA,L] RewriteRule ^search/([^/]+)/?$ index.php?q=$1 [QSA,L] RewriteRule ^search/([^/]+)/record/?([0-9]*)/?$ index.php?q=$1&i=$2 [QSA,L] RewriteRule ^record/([0-9]+)/?$ index.php?i=$1 [QSA,L] RewriteRule ^category/([^/]+)/record/?([0-9]*)/?$ index.php?c=$1&i=$2 [QSA,L] RewriteRule ^category/([^/]+)/?$ index.php?c=$1 [QSA,L] RewriteRule ^trackback/([^/]+)/?$ index.php?p=$1&action=trackback [QSA,L] RewriteRule ^static/([^/]+)/?$ index.php?s=$1 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+)/?$ index.php?p=$4&y=$1&m=$2&d=$3 [QSA,L] RewriteRule ^([0-9]{4})/([0-9]{2})/([^/]+)/?$ index.php?p=$3&y=$1&m=$2 [QSA,L] RewriteRule ^record/([0-9]+)/?$ index.php?i=$1 [QSA,L]