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

Andrew Fyfe andrew at neptune-one.net
Sat Jan 13 13:44:51 CST 2007


Assuming I've understood you right, you want
Reading_and_Writing_to_ECU = ReadingAndWritingToECU

<?php
    $title = @$_REQUEST['title'];
    $title = str_replace('_', ' ', $title);
    $title = ucwords( $title );
    $title = str_replace(' ', '', $title);
    header("Location:
http://scoobypedia.co.uk/enginuity/index.php/Enginuity/$title

Andrew

Crisp, Steve [UK] wrote:
> 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  
> (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.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users





More information about the pmwiki-users mailing list