WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're trying to move away from the /YYYY/MM/DD/Post-Title URL structure without breaking links that are floating around on the internet. The mod_rewrite rule is fairly straight forward -

RewriteRule [0-9]+/[0-9]+/[0-9]+/(.*)$ /$1 [R=301,L]

And it works fine (in that it redirects to the non-existent /$1 pages) UNTIL I change the URL scheme on Wordpress. Presumably, Wordpress is fiddling with the URLs itself in a way that's breaking things.

I imagine it's something many people have done before, can anyone point me in the right direction? Thanks.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/

RewriteRule [0-9]+/[0-9]+/[0-9]+/(.*)$ /$1 [R=301,L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.