info:dc2dw

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
info:dc2dw [2018/05/25 15:20] – créée radeffinfo:dc2dw [2019/02/01 08:04] (Version actuelle) radeff
Ligne 1: Ligne 1:
 +====== dotclear to dokuwiki ======
 +
 +
 +===== php script for migrating posts =====
 +
 <code php> <code php>
 #!/usr/bin/php #!/usr/bin/php
Ligne 299: Ligne 304:
 ?> ?>
 </code> </code>
 +
 +===== hack on dw to integrate dotclear categories =====
 +edit doku.php and add at the beginning of the file:
 +<code php>
 +/*
 +hack radeff for redirecting old dotclear links
 +ex.:
 +http://radeff.red/cms/dotclear/index.php?category/v%C3%A9lo
 +->
 +https://radeff.red/blog/tag/velo?do=showtag&tag=v%C3%A9lo
 +*/
 +//echo phpinfo(); exit;
 +if(preg_match("/index\.php\?category/",$_SERVER['REQUEST_URI'])){
 +  $url=$_SERVER['REQUEST_URI'];
 +  $url=preg_replace("/.*category\//","",$url);
 +  $url="/blog/tag/velo?do=showtag&tag=".$url;
 +  header("Location: ".$url);
 +  exit;
 +}
 +</code>
 +<note important>caution: make a backup, otherwise on next upgrade you'll loose your hack!</note>
 +===== search engine =====
 +
 +add this in your .htaccess
 +<code>#redirection ancien moteur de recherche dotclear
 +RewriteRule ^index.php?(.*)   doku.php?id=start&do=search&$1 [QSA,L]</code>
  • info/dc2dw.1527254421.txt.gz
  • Dernière modification : 2018/05/25 15:20
  • de radeff