Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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]
</IfModule>
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.