Script de redirection sans tenir compte...........
Posté : 21 mars 2007, 21:07
Bonjour!
Je voudrais faire un script de redirection qui ne tient pas compte de PHPSESSID=.
Je vous explique: Voulant remplacer mon ancien site http://www.linux-aide.org par http://wiki.linux-aide.org, sans déstabiliser les visiteurs/robots, j'ai fait un petit script PHP qui à chaque page de l'ancien site, associait la redirection vers la nouvelle page:
Comment faut il donc faire pour ne pas tenir compte de PHPSESSID?
J'ai essayé le script suivant mais sans succès.......
Merci d'avance
Bonne soirée!
Je voudrais faire un script de redirection qui ne tient pas compte de PHPSESSID=.
Je vous explique: Voulant remplacer mon ancien site http://www.linux-aide.org par http://wiki.linux-aide.org, sans déstabiliser les visiteurs/robots, j'ai fait un petit script PHP qui à chaque page de l'ancien site, associait la redirection vers la nouvelle page:
Seul problème, lorsqu'un PHPSESSID est associé à la page, comme par exemple sur des liens référencés dans google ou dans des favoris de visiteurs, le script ne marche plus.<?php
header("HTTP/1.1 301 Moved Permanently");
if($_SERVER["REQUEST_URI"] === "/articles.php?lng=fr&pg=48")
header("Location: http://wiki.linux-aide.org/index.php?n= ... CeQueLinux");
if($_SERVER["REQUEST_URI"] === "/articles.php?lng=fr&pg=574")
header("Location: http://wiki.linux-aide.org/index.php?n= ... onHistoire");
if($_SERVER["REQUEST_URI"] === "/articles.php?lng=fr&pg=549")
header("Location: http://wiki.linux-aide.org/index.php?n= ... LaMascotte");
Comment faut il donc faire pour ne pas tenir compte de PHPSESSID?
J'ai essayé le script suivant mais sans succès.......
Avez vous une idée pour résoudre mon problème?<?php
header("HTTP/1.1 301 Moved Permanently");
if(strpos($_SERVER["REQUEST_URI"], "articles.php?lng=fr&pg=48") <> FALSE)
header("Location: http://wiki.linux-aide.org/index.php?n= ... CeQueLinux");
if(strpos($_SERVER["REQUEST_URI"], "/articles.php?lng=fr&pg=574") != false)
header("Location: http://wiki.linux-aide.org/index.php?n= ... onHistoire");
if(strpos($_SERVER["REQUEST_URI"], "/articles.php?lng=fr&pg=549") !=FALSE)
header("Location: http://wiki.linux-aide.org/index.php?n= ... LaMascotte");
Merci d'avance
Bonne soirée!