Mod_rewrite difficulties

wordpress

#1

I’m hoping someone here might be able to tell me what I’m doing wrong. I’ve been working from some mod_rewrite tutorials, but I don’t know enough about what I’m doing to figure out why this isn’t working.

Background: I just switched from Movable Type to Wordpress. I used Alex King’s redirect script to get the individual entry archives to automatically redirect to the new addresses, but since I switched to using a date-based archive a while back, I’d like to make it so those URLs aren’t broken, and I haven’t been able to find anything that would automate the process (I couldn’t get the script to work in the date-based archive template), to I’m trying to come up with with a rewrite rule to handle it.

I’m trying to redirect URLS like this: http://daisywreath.net/journal/archives/2005_04_23.html to this: http://daisywreath.net/journal/2005/04/23/

The rule I’ve come up with so far, which isn’t working:
RewriteRule ^archives/200([0-9])]([0-9]{2})([0-9]{2}).html 200$1/$2/$3/ [R]

Can anyone tell me what I’m doing wrong? Any advice will be much appreciated!


#2

Since this is a WordPress-related issue, you’ll probably have better luck asking over at the WordPress Support Forums.


MacManX.com
I don’t work here. I’m just your typical support forum volunteer.


#3

RewriteRule ^archives/200([0-9])]_([0-9]{2})_([0-9]{2})\.html 200$1/$2/$3/ [R]You have an extra ] in there, before the first underscore…

:cool: Perl / MySQL / HTML+CSS


#4

D’oh! I probably could’ve looked at that all day and not seen the extra bracket. It’s working great now. Thank you!


#5

Nice catch, Atropos7.


MacManX.com
I don’t work here. I’m just your typical support forum volunteer.