questo metodo potrebbe ( secondo mio avviso ) penalizzarti sull'indicizzazione.

Un metodo un pò più accessibile sarebbe quello di usare get, così:

Codice PHP:

$lang 
$_GET['lang'];

if ( 
$lang == 'it' ) {

header("Location: /it/index.php");

}

if ( 
$lang == 'en' ) {

header("Location: /en/index.php");


così google indicizzerebbe sia la pagina.php?lang=it che la pagina.php?lang=en

ciao