[pmwiki-users] Mediawiki to PmWiki migration - how to preserve old links

Crisp, Steve [UK] SCRISP at ngms.eu.com
Sat Jan 13 12:19:32 CST 2007


Patrick, all,
 
Feedback on your idea below ... it works great however could do with a slight enhancement I'm sure is easy for you guys.
 
How can I tweek the code extract below to capitalise each word in $title below before removing the underscore.  This will allow me to support mixed case MediaWiki page names.  Example URLs below:
 
http://wiki.enginuity.org/index.php?title=Frequently_Asked_Questions <http://wiki.enginuity.org/index.php?title=Frequently_Asked_Questions>   (already supported)
http://wiki.enginuity.org/index.php?title=Reading_and_Writing_to_ECU (note the case of 'and')
 
Patrick R. Michaud wrote:
> I'd do it with a special-purpose php script.
>     <?php
>       $title = @$_REQUEST['title'];
>       $title = str_replace('_', '', $title);
>       header("Location: http://scoobypedia.co.uk/enginuity/index.php/Enginuity/$title <https://mail.ngms.eu.com:2000/exchweb/bin/redir.asp?URL=http://scoobypedia.co.uk/enginuity/index.php/Enginuity/$title> ");

-Steve.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070113/ec6abd9e/attachment.html 


More information about the pmwiki-users mailing list