[pmwiki-users] search and replace over multiple / all pages

Clemens Gruber cgruber at uni-osnabrueck.de
Fri Jul 6 07:29:15 CDT 2012


Hi, I have to change some URLs in an existing wiki with more than 
hundred pages.

The old links is something like that
http://example.com/aaaaaa/bbbb/more-stuff.html?x=1&y=2&y=3

the new links
http://example.com/hhhhhh/jjjj/more-stuff.html?x=1

Have to do it on the wiki, no chance to do it on the remote server via 
redirect / htaccess I do not need any documentation of this change 
(history) so my idea is search and replace on file level all files under 
wiki.d .

Are there any side effects you think not do do it this way? Are there 
more elegant ways (e.g. with documentation as diff) to do this?

Is there any script where I can specify old (search for) and new 
(replace with) text parts

http://example.com/aaaaaa/bbbb/more-stuff.html?x=1&y=2&y=3 | 
http://example.com/hhhhhh/jjjj/more-stuff.html?x=1
http://example.com/aaaaaa/bbbb/more-stuff.html?x=4&y=5&y=6 | 
http://example.com/hhhhhh/jjjj/more-stuff.html?x=4
http://example.com/aaaaaa/bbbb/more-stuff.html?x=7&y=8&y=9 | 
http://example.com/hhhhhh/jjjj/more-stuff.html?x=7

Regards
Clemens





More information about the pmwiki-users mailing list