diff --git a/ecrire/inc_admin_index.php b/ecrire/inc_admin_index.php
index eed9b9d2bc30aa923e7d064a3e16e6472dbfa30a..4744cca6a6de8ae2ef11fa1998585a6a48ff2168 100644
--- a/ecrire/inc_admin_index.php
+++ b/ecrire/inc_admin_index.php
@@ -34,7 +34,7 @@ fin_boite_info();
 
 debut_raccourcis();
 echo "<p>";
-icone_horizontale (_L('Voir le vocabulaire indexe'), "index_tous.php", "statistiques-24.gif");
+ icone_horizontale (_L('Voir le vocabulaire indexe'),  generer_url_ecrire("index_tous.php"), "statistiques-24.gif");
 echo "</p>";
 
  icone_horizontale (_L('Mettre &agrave; jour les infos d\'indexation du site'), generer_url_ecrire("admin_index", "mise_a_jour=oui"), "cache-24.gif");
diff --git a/ecrire/inc_admin_vider.php b/ecrire/inc_admin_vider.php
index f782d35861d29c543c5ed5a01798c6d770f5f3be..b7de14a52d20a6957a56127d2317e8db1cd839b9 100644
--- a/ecrire/inc_admin_vider.php
+++ b/ecrire/inc_admin_vider.php
@@ -121,15 +121,11 @@ if ($quota_cache) {
 
  debut_cadre_relief("image-24.gif", false, "", _T('info_images_auto'));
 
- $action = 'purger';
- $arg = 'taille_vignettes';
- $hash = calculer_action_auteur("$action $arg");
-
- echo "<div style='text-align: center;'>",
-   "<iframe width='530px' height='65px' src='",
-   generer_action_auteur($action, $arg) . "&lang=$spip_lang",
-   "'></iframe>",
-   "</div>";
+ echo "<div style='text-align: center;'>
+<iframe width='530px' height='65px' src='",
+   generer_action_auteur('purger','taille_vignettes') . "&lang=$spip_lang",
+   "'></iframe>
+</div>";
 
  $action = 'purger';
  $arg = 'vignettes';
diff --git a/ecrire/inc_index_tous.php b/ecrire/inc_index_tous.php
index 5f063f8a75600bc70d2cca5246b47c3966ca9563..a95b24768e63c04ae962018452598e01a98da0a7 100644
--- a/ecrire/inc_index_tous.php
+++ b/ecrire/inc_index_tous.php
@@ -73,7 +73,7 @@ function index_tous_dist()
 	icone_horizontale (_L('Statut de l\'indexation'), generer_url_ecrire("admin_index"), "tout-site-24.gif");
 	echo "</p>";
 
-	icone_horizontale (_L('Tout'), "index_tous.php", "tout-site-24.gif");
+	icone_horizontale (_L('Tout'), generer_url_ecrire("index_tous.php"), "tout-site-24.gif");
 
 	$link = new Link();
 	$link->addVar('filtre',$filtre);
@@ -191,15 +191,17 @@ function index_tous_dist()
 				else {
 					$puce = 'puce-orange-breve.gif';
 				}
-				$s = "";
-				$s .= "<img src='img_pack/$puce' width='7' height='7' style='border:0px;' />";
-				$s .= "[$points] ";
-				$s .= "<a href='recherche.php3?recherche=";
-				$s .= urlencode($dico);
-				$s .= "' title='$occurences occurences'>";
-				$s .= $dico . "</a>";
-				$s .= "&nbsp;";
-				$vals[] = $s;
+				$vals[] = "<img src='img_pack/"
+				  . $puce 
+				  . "' width='7' height='7' style='border:0px;' />["
+				  . $points
+				  . "] <a href='" 
+				  . generer_url_ecrire("recherche", "recherche=" . urlencode($dico))
+				  .  "' title='"
+				  . $occurences
+				  . " occurences'>"
+				  .  $dico
+				  . "</a>&nbsp;";
 
 				if (fmod($compteur_liste,3)==0){
 					$tableau[] = $vals;
diff --git a/ecrire/inc_mini_nav.php b/ecrire/inc_mini_nav.php
index 25947c65ec59027c188c2d708d26a1da8bc2cbce..090b8cee372097ade8e11cd28c76468c1134f8c3 100644
--- a/ecrire/inc_mini_nav.php
+++ b/ecrire/inc_mini_nav.php
@@ -77,8 +77,7 @@ function mini_afficher_rubrique ($id_rubrique, $rac="", $liste="", $col = 1, $ru
 					$titre = "<div class='rub-ouverte'>$titre</div>";
 
 					# ensuite, l'ouverture du menu des sous-rubriques
-					$url = "ajax_page.php?fonction=aff_rub&rac=$rac"
-					."&exclus=$rub_exclus&id=$la_rub&col=".($col+1);
+					$url = generer_url_ecrire("ajax_page.php", "fonction=aff_rub&rac=$rac&exclus=$rub_exclus&id=$la_rub&col=".($col+1));
 					$onClick .= "charger_id_url('$url',"
 					. "'".$rac."_col_".($col+1)
 					."', 'slide_horizontal(\'".$rac."_principal\', \'"
@@ -178,7 +177,7 @@ function mini_nav ($sel, $rac="",$fonction="", $rub_exclus=0, $aff_racine=false)
 		$ondbClick .= "findObj('selection_rubrique').style.display='none';";
 	}
 
-	$onClick .= "charger_id_url('ajax_page.php?fonction=aff_rub&rac=$rac&exclus=$rub_exclus&id=0&col=1', '".$rac."_col_1');";
+	$onClick .= "charger_id_url('" . generer_url_ecrire("ajax_page.php", "fonction=aff_rub&rac=$rac&exclus=$rub_exclus&id=0&col=1'") . ", '".$rac."_col_1');";
 
 	$ret .= "<div class='arial11 petite-rubrique' onclick=\"$onClick\" ondblclick=\"$ondbClick$onClick\" style='background-image: url(" . _DIR_IMG_PACK . "racine-site-12.gif); background-color: white; border: 1px solid $couleur_foncee; border-bottom: 0px; width: 134px;'><div class='pashighlight'>";
 	$ret .= _T("info_racine_site");
diff --git a/ecrire/inc_mots.php3 b/ecrire/inc_mots.php3
index e9d7ed3e28e7ea57fc737695e3c894deb4028ee2..e149b89f09431b7c4711b64fdd472e292ff61403 100644
--- a/ecrire/inc_mots.php3
+++ b/ecrire/inc_mots.php3
@@ -605,7 +605,7 @@ function afficher_groupe_mots($id_groupe) {
 	$tmp_var = substr(md5($jjscript), 0, 4);
 	
 			
-	$javascript = "charger_id_url('ajax_page.php?fonction=sql&amp;id_ajax_fonc=::id_ajax_fonc::::deb::','$tmp_var')";
+	$javascript = "charger_id_url('" . generer_url_ecrire("ajax_page.php", "fonction=sql&amp;id_ajax_fonc=::id_ajax_fonc::::deb::'") . ",'$tmp_var')";
 	$tranches = afficher_tranches_requete($query, 3, $tmp_var, $javascript);
 
 
diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3
index 4f069358dcda72820ab9796d0b2f936201862a8f..e6102d24b0e81b086d20386b0dbe7dbfd5833676 100644
--- a/ecrire/inc_presentation.php3
+++ b/ecrire/inc_presentation.php3
@@ -757,7 +757,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a
 
 
 	$tmp_var = substr(md5($jjscript), 0, 4);
-	$javascript = "charger_id_url('ajax_page.php?fonction=sql&amp;id_ajax_fonc=::id_ajax_fonc::::deb::','$tmp_var')";
+	$javascript = "charger_id_url('" . generer_url_ecrire("ajax_page.php","fonction=sql&id_ajax_fonc=::id_ajax_fonc::::deb::") . "','$tmp_var')";
 	$tranches = afficher_tranches_requete($requete, $afficher_auteurs ? 4 + $ajout_col : 3 + $ajout_col, $tmp_var, $javascript);
 
 	$requete = str_replace("FROM spip_articles AS articles ", "FROM spip_articles AS articles LEFT JOIN spip_petitions AS petitions USING (id_article)", $requete);
@@ -789,7 +789,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a
 
 			if ($afficher_trad) {
 				$texte_img .= http_img_pack("searching.gif", "*", "style='border: 0px; visibility: hidden; float: $spip_lang_right' id = 'img_$div_trad'");
-				$texte_img .= "<div style='float: $spip_lang_right;'><a href=\"javascript:charger_id_url('ajax_page.php?fonction=sql&amp;id_ajax_fonc=$id_ajax_trad','$div_trad');\"><img src='img_pack/langues-12.gif' border='0' /></a></div>";
+				$texte_img .= "<div style='float: $spip_lang_right;'><a href=\"javascript:charger_id_url('" . generer_url_ecrire('ajax_page.php', "fonction=sql&id_ajax_fonc=$id_ajax_trad"). "','$div_trad');\"><img src='img_pack/langues-12.gif' border='0' /></a></div>";
 			}
 			bandeau_titre_boite2($texte_img.$titre_table, "article-24.gif");
 
@@ -980,7 +980,7 @@ function afficher_articles_trad($titre_table, $requete, $afficher_visites = fals
 	$hash = "0x".substr(md5($connect_id_auteur.$jjscript), 0, 16);
 	$tmp_var = substr(md5($jjscript), 0, 4);
 	
-	$javascript = "charger_id_url('ajax_page.php?fonction=sql&amp;id_ajax_fonc=::id_ajax_fonc::::deb::','$tmp_var')";
+	$javascript = "charger_id_url('" . generer_url_ecrire('ajax_page.php', 'fonction=sql&id_ajax_fonc=::id_ajax_fonc::::deb::') . "','$tmp_var')";
 	$tranches = afficher_tranches_requete($requete, 4, $tmp_var, $javascript);
 
 	$requete = str_replace("FROM spip_articles AS articles ", "FROM spip_articles AS articles LEFT JOIN spip_petitions AS petitions USING (id_article)", $requete);
@@ -1007,7 +1007,7 @@ function afficher_articles_trad($titre_table, $requete, $afficher_visites = fals
 			
 			$texte_img .= http_img_pack("searching.gif", "*", "style='border: 0px; visibility: hidden; float: $spip_lang_right' id = 'img_$div_trad'");
 
-			$texte_img .= "<div style='float: $spip_lang_right;'><a href=\"javascript:charger_id_url('ajax_page.php?fonction=sql&amp;id_ajax_fonc=$id_ajax_trad','$div_trad');\"><img src='img_pack/langues-off-12.gif' border='0' /></a></div>";
+			$texte_img .= "<div style='float: $spip_lang_right;'><a href=\"javascript:charger_id_url('" . generer_url_ecrire('ajax_page.php', "fonction=sql&id_ajax_fonc=$id_ajax_trad") . "','$div_trad');\"><img src='img_pack/langues-off-12.gif' border='0' /></a></div>";
 
 			bandeau_titre_boite2($texte_img.$titre_table, "article-24.gif");
 
@@ -1932,7 +1932,7 @@ function barre_onglets($rubrique, $onglet){
 	}
 	if ($rubrique == "repartition") {
 		if ($GLOBALS['meta']['multi_articles'] == 'oui' OR $GLOBALS['meta']['multi_rubriques'] == 'oui') {
-			onglet(_T('onglet_repartition_rubrique'), "statistiques_repartition.php", "rubriques", $onglet, "rubrique-24.gif");
+		  onglet(_T('onglet_repartition_rubrique'), generer_url_ecrire("statistiques_repartition"), "rubriques", $onglet, "rubrique-24.gif");
 			onglet(_T('onglet_repartition_lang'), generer_url_ecrire("statistiques_lang",""), "langues", $onglet, "langues-24.gif");
 		}
 	}
@@ -1944,8 +1944,8 @@ function barre_onglets($rubrique, $onglet){
 	}
 
 	if ($rubrique == "stat_depuis") {
-		onglet(_T('icone_repartition_actuelle'), "statistiques_repartition.php", "popularite", $onglet);
-		onglet(_T('onglet_repartition_debut'), "statistiques_repartition.php?critere=debut", "debut", $onglet);
+	  onglet(_T('icone_repartition_actuelle'), generer_url_ecrire("statistiques_repartition"), "popularite", $onglet);
+	  onglet(_T('onglet_repartition_debut'), generer_url_ecrire("statistiques_repartition.php", "critere=debut"), "debut", $onglet);
 
 	}
 
@@ -2555,7 +2555,7 @@ if (true /*$bandeau_colore*/) {
 //		  http_img_pack("tout-site.png", "", "width='26' height='20' border='0'") . "</a>";
 
 		$id_rubrique = $GLOBALS['id_rubrique'];
-		echo "<a href='" . generer_url_ecrire("articles_tous") . "' class='icone26' onMouseOver=\"changestyle('bandeautoutsite','visibility','visible'); charger_id_url_si_vide('ajax_page.php?fonction=aff_nav_recherche&id=$id_rubrique','nav-recherche');\">" .
+		echo "<a href='" . generer_url_ecrire("articles_tous") . "' class='icone26' onMouseOver=\"changestyle('bandeautoutsite','visibility','visible'); charger_id_url_si_vide('" . generer_url_ecrire('ajax_page.php', "fonction=aff_nav_recherche&id=$id_rubrique") . "','nav-recherche');\">",
 		  http_img_pack("tout-site.png", "", "width='26' height='20' border='0'") . "</a>";
 		if ($id_rubrique > 0) echo "<a href='" . generer_url_ecrire("brouteur","id_rubrique=$id_rubrique") . "' class='icone26' onMouseOver=\"changestyle('bandeaunavrapide','visibility','visible');\">" .
 		  http_img_pack("naviguer-site.png", "", "width='26' height='20' border='0'") ."</a>";
@@ -3072,7 +3072,7 @@ function debut_gauche($rubrique = "asuivre") {
 		$largeur_ecran = 974;
 		
 		// Si edition de texte, formulaires larges
-		if (ereg('((articles|breves|rubriques)_edit|forum_envoi)\.php', $GLOBALS['REQUEST_URI'])) {
+		if (ereg('((articles|breves|rubriques)_edit|forum_envoi)', $GLOBALS['REQUEST_URI'])) {
 			$flag_centre_large = true;
 		}