Bonjour à tous,
Alors j'ai un regex de ce type :
RewriteRule ^(.*)-(.*)-(.*).html$ $1.php?id=$2&news=$3 [L]
Une fonction qui me vire les espaces et caracteres speciaux d'une chaine en "_".
Donc si je lui envoi :
$text = "hello c'est moi";
echo Nstr($text);
Sa me renvoi : "hello_c_est_moi" .
Si l'id de la news "hello c'est moi" est 1 j'ai une url de ce type :
article-1-hello_c_est_moi.html
Seulement j'aimerais qu'elle soit comme sa :
article-1-hello-c-est-moi.html
Seulement sa plante probleme de regex il crois que chaque tiret est une nouvelle réference...
Quel regex me faudrait t'il employer svp ?
Merci

 

 
		
		 
         
 

 
			
			

 
			 
   


 [Url Rewriting] Regex complexe
 [Url Rewriting] Regex complexe
				 Répondre avec citation
  Répondre avec citation

 
  
  
 
 
 
 
			 
  
						
Partager