Support » Fixing WordPress » Permalink / mod_rewrite issues

  • I’m having a bit of a problem getting my WordPress 2.1 install to recognize the date based permalinks.
    The site in question is at
    You’ll notice the categorical archive links work fine. The monthly archives, however, do not work. I’ve read various messages here on the support forum about folks with internal server errors and such. I’m not having that problem. WordPress works fine, it just says “Sorry, no posts matched your criteria.”
    Here is my .htaccess file:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/?(.*) /index.php?category_name=$1 [QSA]
    RewriteRule ^archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2 [QSA]
    RewriteRule ^archives/author/?(.*) /index.php?author_name=$1 [QSA]
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&name=$3&page=$4 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([_0-9a-z-]+)?/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?year=$1&monthnum=$2&name=$3&feed=$4 [QSA]
    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([_0-9a-z-]+)?/trackback/?$ /wp-trackback.php?year=$1&monthnum=$2&name=$3 [QSA]
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1 [QSA]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp-feed.php?feed=$1&withcomments=1 [QSA]
    My template tag permalink is: /archives/%year%/%monthnum%/%postname%/
    and my categories permalink is set to : /archives

Viewing 7 replies - 1 through 7 (of 7 total)
  • I tried every suggestion in that thread before posting my message.
    When I remove /archives/ from the permalink path, it works. But why is that? And more importantly, how can it be fixed? Since /archives/ is listed in the example given in the control panel, I assume it has to work somehow. 🙂

    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&name=$3&page=$4 [QSA]

    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&name=$3&page=$4 [QSA]

    I made the change as you suggested. Still no dice.

    If you visit
    you’ll see it shows “no messages met the criteria”. But if you add in “index.php” to the URL, like this:
    Then it works.

    Thank you, Thomas! Yours was the only suggestion that worked.
    I guess the .htaccess file generated by WordPress is no good, at least for my ISP’s setup (I’m with
    Could I bug you for a little more help on one thing? In my old Movable Type setup, the postname in the URLs used underscores instead of dashes. How would I go about either a) using underscores in WP or b) having a mod_rewrite rule so the old URLs would be forwarded to the new URL?

    Has nothing to do with your isp. Has everything to do with having same startfolder of the URI for your categories and your permalinks: “archives”.
    underscores: don’t forget that google prefers dashes gives basically 2 solutions
    1 > plugin to create underscores
    2 > use external mod rewrite to guide visitors to new URI with dashes (imho preferable)
    good luck

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permalink / mod_rewrite issues’ is closed to new replies.