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

Crisp, Steve [UK] SCRISP at ngms.eu.com
Sat Jan 13 03:30:05 CST 2007


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> ");

Andrew wrote:You should also send the proper HTTP response header, it won't make much
difference for normal users, but for search engines will now that the
new location is the same page (keeping it's page rank) rather than
reindexing it as a new page (starting with a 0 page rank).

If the location is permanent use:
    header('HTTP/1.1 301 Moved Permanently');
or if it's only a tempory location use:
    header('HTTP/1.1 307 Temporary Redirect');


Andrew


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


More information about the pmwiki-users mailing list