Mod_rewrite difficulties



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: to this:

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!


Since this is a WordPress-related issue, you’ll probably have better luck asking over at the WordPress Support Forums.
I don’t work here. I’m just your typical support forum volunteer.


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


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


Nice catch, Atropos7.
I don’t work here. I’m just your typical support forum volunteer.