correct mod_rewrite rules for monthly archives?
-
Hi all,
I think my mod_rewrite rules for monthly archives are somehow messed up. I didn’t change anything, but they don’t work:
https://iroke.de/wp/
Since I can’t read the syntax, it would be very nice if somebody could either send me working rules and tell me which one of the following are responsible for the error:# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [S=43]
RewriteRule ^(.*)/(..)/?$ /wordpress/$1/?cl_lang=$2 [QSA]
RewriteRule ^(..)/?$ /wordpress/?cl_lang=$1 [QSA]
RewriteRule ^(contact)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
RewriteRule ^(contact)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(contact)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(contact)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^(contact)(/[0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1 [QSA,L]
RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1 [QSA,L]
RewriteRule ^page/?([0-9]{1,})/?$ /wp/index.php?&paged=$1 [QSA,L]
RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1&withcomments=1 [QSA,L]
RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1&withcomments=1 [QSA,L]
RewriteRule ^comments/page/?([0-9]{1,})/?$ /wp/index.php?&paged=$1 [QSA,L]
RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /wp/index.php?s=$1&paged=$2 [QSA,L]
RewriteRule ^search/(.+)/?$ /wp/index.php?s=$1 [QSA,L]
RewriteRule ^category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /wp/index.php?category_name=$1&paged=$2 [QSA,L]
RewriteRule ^category/(.+)/?$ /wp/index.php?category_name=$1 [QSA,L]
RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /wp/index.php?author_name=$1&paged=$2 [QSA,L]
RewriteRule ^author/([^/]+)/?$ /wp/index.php?author_name=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /wp/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /wp/index.php?year=$1&monthnum=$2 [QSA,L]
RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&paged=$2 [QSA,L]
RewriteRule ^([0-9]{4})/?$ /wp/index.php?year=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)/trackback/?$ /wp/index.php?year=$1&monthnum=$2&name=$3&tb=1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&name=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&name=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&name=$3&paged=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$ /wp/index.php?year=$1&monthnum=$2&name=$3&page=$4 [QSA,L]
RewriteRule ^index.php/feed/(feed|rdf|rss|rss2|atom)/([0-9,]+)/?$ /wp/index.php?&feed=$matches[1]&cat=$matches[2] [QSA,L]
RewriteRule ^index.php/(feed|rdf|rss|rss2|atom)/([0-9,]+)/?$ /wp/index.php?&feed=$matches[1]&cat=$matches[2] [QSA,L]
</IfModule># END WordPress
- The topic ‘correct mod_rewrite rules for monthly archives?’ is closed to new replies.