Support » Fixing WordPress » mod_rewrite archive

  • I would like to have /archives/ bring up an archives.php file. Currently I’m using:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/(.*) /index.php?category_name=$1 [QSA]
    in my .htaccess file for my permalinks. Does anyone know the proper way to add this on?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just accomplished it by adding these two lines after the RewriteBase / line. 🙂
    RewriteRule ^archives$ /archives.php
    RewriteRule ^archives/$ /archives.php

    Update….this can be done with one line:
    RewriteRule ^archives/?$ /archives.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.