tirussell
Member
Posted 1 year ago #
After an export/import and general site restructuring, my most important blog (my President's) went from
/offices/president/blog/index.php/YYYY/MM/DD/slug-goes-here
to
/president/YYY/MM/slug-goes-here
What I need is the regular expression that will allow me to search and replace internal links in the post bodies (in a SQL dump). This is way out of my league regex-wise. Any regex gurus out there?
YYY or YYYY?
If it's YYYY, then with caveats...
RewriteRule ^offices/president/blog/index.php/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://domain.com/president/$1/$2/$4 [L,R=301]
Theory should work. I use something VERY similar. $1 is your years, $2 is months, and $4 is slug :) The $3 was day.
denverguy
Member
Posted 8 months ago #
I also changed my permalinks and need a regular expression to change
From: /postname/
To: /blog/category/postname
Can you help? Thanks!