Sujet : Re: URL rewriting qui ne marche plus correctement
De : loiseauthierry (at) *nospam* free.fr (Thierry Loiseau)
Groupes : fr.comp.infosystemesDate : 27. Jun 2024, 14:44:19
Autres entêtes
Organisation : La tête dans les étoiles
Message-ID : <667d6cb3$0$8228$426a74cc@news.free.fr>
References : 1
User-Agent : MacSOUP/F-2.8.4 (6da4d6e6d0) (Mac OS X version 10.9.5 (x86))
pehache <
pehache.7@gmail.com> wrote:
==============================================
<?php
if (substr($argv[count($argv)-1],-4)!="html") {
header('Location:
'.$_SERVER["SCRIPT_URI"]."%3F".$_SERVER["QUERY_STRING"].".html");
exit(); }
?>
==============================================
Ca marchait très bien. Mais sur la page perso Free ça ne marche pas.
L'URL est bien réécrite (donc le fichier php est exécuté), mais le
résultat n'est pas conforme à ce qu'il était avant:
http://mapage.free.fr/monsite/viewtopic.php?f=5&t=482
devient:
http://mapage.free.fr/monsite/%3Ff=5&t=482.html
"viewtopic.php" est donc supprimé de l'URL...
Sans doute que _SERVER["SCRIPT_URI"] n'est pas disponible ?
Vérifier en faisant un phpinfo() ?
Thierry
-- * * __*__ * * * * -----oOOo--- O ---oOOo------- * * http://astrophoto.free.fr * * * -------- oOOo oOOo ---------- *