Dotclear to WordPress Rewrite rule 1


I hate rewrite rules, and they hate me too.

So I used a PHP file.

<?php
$sRadNewAdress='/wp';

if (isset($_SERVER['QUERY_STRING'])&&($_SERVER['QUERY_STRING']!='')) {
	$sQstring = $_SERVER['QUERY_STRING'];
	$aString = explode('/', $sQstring);
	$sNewAdress = $sRadNewAdress."/".$aString[1]."/".$aString[2]."/".strtolower ($aString[4]);
}
else {
	$sNewAdress = $sRadNewAdress;
}


header('Location: '.$sNewAdress); //Redirection HTTP
header('HTTP/1.1 301 Moved Permanently');
header('Status: 301 Moved Permanently');
header('Content-Type: text/html; charset=UTF-8');

Fab

Engineer - Web Juggler - Confit de canard
Fab

Latest posts by Fab (see all)


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Dotclear to WordPress Rewrite rule