• I’ve recently converted my girlfriends blog over from MT to WordPress, and for the most part the switch has been simple and flawless.
    At the moment I’m trying to have permalinked posts (/archives/2004/05/30/wee/) point to a different index (which I’m calling single.php), but have the monthly archives point to the regular index.php.
    As far as I can tell, the line controlling permalinks and archives are in this htaccess line:
    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]
    I’ve tried adding the file name to just the permalink (<?php permalink_link('single.php',''); ?>), with no success – I guess the htaccess takes precedence.
    I know very little about htaccess, so could someone please help me out and split the above into two lines, one having monthly archives go to the traditional index.php, and the individual pointing toward single.php?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter evilwayz

    (@evilwayz)

    *bump*

    this should do the trick (hopefully)

    #rewrite for single (paged) post
    RewriteRule ^archives/([0-9]{4})/?([0-9]{1,2})/?([0-9]{1,2})/?([_0-9a-z-]+)/?([0-9]+)?/?$
    /single.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,NC,L]


    #rewrite for total archive + month, week & day filters
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?$
    /index.php?year=$1&monthnum=$2&day=$3 [QSA,NC,L]

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘htaccess and permalink help’ is closed to new replies.