Title: htaccess and permalink help
Last modified: August 18, 2016

---

# htaccess and permalink help

 *  [evilwayz](https://wordpress.org/support/users/evilwayz/)
 * (@evilwayz)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/htaccess-and-permalink-help/)
 * 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](https://wordpress.org/support/users/evilwayz/)
 * (@evilwayz)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/htaccess-and-permalink-help/#post-59524)
 * *bump*
 *  [thomasmaas](https://wordpress.org/support/users/thomasmaas/)
 * (@thomasmaas)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/htaccess-and-permalink-help/#post-59525)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [thomasmaas](https://wordpress.org/support/users/thomasmaas/)
 * Last activity: [21 years, 11 months ago](https://wordpress.org/support/topic/htaccess-and-permalink-help/#post-59525)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
