[pmwiki-users] How to change the upload path and retain backward compatibility

kirpi at kirpi.it kirpi at kirpi.it
Mon Jan 11 07:12:42 CST 2010

I have all my wiki uploads set to
but I need to switch to

Uploaded images are mostly used in wiki pages as attachments.

A few steps are required in order to keep the whole system working
smooth, there included backward compatibility to the absolute links
spread all over the net (web pages, emails, forums,...) and hardcoded
inside many links, scripts, html and css pages anywhere.
I guess I should:

 - In /local/config.php update with
     $UploadDir = '/web/htdocs/www.example.com/home/new/uploads';
     $UploadUrlFmt = 'http://www.example.com/new/uploads';

 - Move all the uploaded content from www.example.com/old/ to
www.example.com/new/ by just renaming /old/ into /new/

 - Set some sort of apache redirect from www.example.com/old/... to
www.example.com/new/... I am a bit puzzled on how to actually write
such a piece of code. What about this?
     RewriteRule ^www.example.com/old/$ www.example.com/new/  [R=301]

 - How much does it all involve Google policies, ranks, 301 errors and
other exotic things?

Would such an approach be fine? Am I missing any step or, worse,
failing anywhere?
I will really appreciate any advice, especially the apache part, just
not to spoil/block things.
Thank you


More information about the pmwiki-users mailing list