Support » Fixing WordPress » regex help after permalink change

  • After an export/import and general site restructuring, my most important blog (my President’s) went from




    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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})/(.*)$$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.

    I also changed my permalinks and need a regular expression to change

    From: /postname/
    To: /blog/category/postname

    Can you help? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘regex help after permalink change’ is closed to new replies.