Moving away from date permalinks
-
I am trying to move away from having dates in my permalinks since they serve no purpose on my site. I am having trouble with a RewriteRule to redirect old permalinks.
I would like https://www.mydomain.com/2008/07/19/my-post-title/ to redirect to https://www.mydomain.com/my-post-title/
The rule I have been trying is
RewriteRule ^([0-9]{4})/([0-9]+)/([0-9]+)/([^/]+)/*$ https://www.mydomain.com/$4/ [L,R=301]But that ends up as a 500 Server Error because the redirect never completes (loops).
I can change the redirect from $4 to $1 and the post is redirected to /2008/, same for $2 and $3. $4 always time-out.
Any ideas?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Moving away from date permalinks’ is closed to new replies.