Code: Select all
UPDATE serendipity_staticpages SET permalink = REPLACE(permalink, "/index.php?/pages/", "/pages/") WHERE permalink LIKE '%index.php%';
There is no need to rewrite any other links pointing to the required static page from '/index.php?/pages/example.html' to '/pages/example.html' too (other than esthetic point of views).