Changing URL scheme, mod_rewrite not helping

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.

Read More

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>

Related posts

Leave a Reply