[dokuwiki] Re: Migrating to Dukuwiki

Yann wrote:
Hello,

I use Dokuwiki for several projects, but it was since startup each time.

Now I would like to use Dokuwiki on an existing site, which has
several pages (many many static or dynamic pages).
Is it possible to install Dokuwiki in a sub-dir, then to replace pages
one by one by a page from Dokuwiki ?
Example :
I have a page called /books.php (in the root of the site).
When called, I would like this page to serve the content of
/dokuwiki/doku.php/en:books, transparently for the visitors.
At startup, only me and the editors would access the wiki (opening it
when migration will be completed).

Is it possible? How?

Thanks ;-)
Yann
Hi

While not having an exact idea of what you want, this is how i did my migration.

my .htaccess in directory hevoset (horses)
AddType application/x-httpd-php .html
ErrorDocument 404 /hevoset/hevoset.php

And the hevoset.php. It tries to find a matching wiki page for the requested page. If found, then does a redirect to it. Otherwise a 404 is shown.
<?php
/**
* Forwarder to doku.php
*/
$base="/wiki/doku.php/hevoset:";
$hevonen=basename($_SERVER['REQUEST_URI'],".html");
$path="/path_to_my_wwwroot/wiki/data/pages/hevoset/" . $hevonen;
if (file_exists($path)){
$new = $base.$hevonen;
header("Location: ".$new);
}


?>

Also the .html (or .php in your case) pages can be redirected straight to the correct wikipage, by changing this to your old page after it has been moved to dokuwiki.

<?php
header("Location: /wiki/doku.php/newpagename");
?>

brgds Otto
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: