Forum : Lws & Hebergeur-discount

Hébergement web, nom de domaine et serveur dédié.

[ISAPI_Rewrite]

Ici, parlez de développement Asp, Php, Asp.net, Mysql / Access, / sql serveur, de bases de données et de développement.
freelancer
Débutant
Débutant
Messages : 10

ven. juil. 21, 2006 9:45 pm  

http://www.bureauticien.com/component/o ... lect/id,1/

Je pense que le pb viens quand même du double / entre Itemid,30 et func,select

freelancer
Débutant
Débutant
Messages : 10

ven. juil. 21, 2006 10:06 pm  

si cela peut d aider j ai un fichier htaccess d origine comme cela ... peut on le transformer en httpd.ini ?













RewriteEngine On














RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php

istrya
Expert
Expert
Messages : 303

sam. juil. 22, 2006 7:30 am  

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /index.php
Je ne crois pas que RewriteCond %{REQUEST_FILENAME} !-f existe dans Isapi, d'ailleur RewriteRule ^(.*) /index.php n'amène à rien...

Essayes ça:

Code : Tout sélectionner

RewriteRule ^/component/option,([a-zA-Z]+)/Itemid,([0-9]+)/{1,2}func,([a-zA-Z]+)/id,([0-9]+)/$ /index.php\?option=$1&Itemid=$2&func=$3&id=$4 [L]

freelancer
Débutant
Débutant
Messages : 10

sam. juil. 22, 2006 9:23 pm  

Désolé, mais cela ne fonctionne pas mieux :(

istrya
Expert
Expert
Messages : 303

dim. juil. 23, 2006 8:43 am  

Et si tu supprimes les un des slashs en double dans l'url manuellement? et avec l'ancien code code :

Code : Tout sélectionner

RewriteRule ^/component/option,([a-zA-Z]+)/Itemid,([0-9]+)/func,([a-zA-Z]+)/id,([0-9]+)/$ /index.php\?option=$1&Itemid=$2&func=$3&id=$4 [L]
Aussi, n'hésite pas à rechaer la page plusieurs fois et/ou à vider le cache de ton navigateur.

Sinon on pourra te considérer comme maudit :lol: .

freelancer
Débutant
Débutant
Messages : 10

dim. juil. 23, 2006 11:08 pm  

:( ça ne fonctionne pas.
J'ai accès au fichier qui rewrite les URL le voici mais je n y comprends pas grand chose :

<?php
/**
* @version $Id: sef.php,v 1.9 2005/02/16 18:16:51 saka Exp $
* @package Mambo
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'] .= $_SERVER['QUERY_STRING'];
}
if ($mosConfig_sef) {
$url_array = explode("/", $_SERVER['REQUEST_URI']);
/**
* Content
* http://www.domain.com/$option/$task/$se ... limitstart
*/
if (in_array("content", $url_array)) {

$uri = explode("content/", $_SERVER['REQUEST_URI']);
$option = "com_content";
$_GET['option'] = $option;
$_REQUEST['option'] = $option;
$pos = array_search ("content", $url_array);

// language hook for content
$lang = "";
foreach($url_array as $key=>$value) {
if ( !strcasecmp(substr($value,0,5),"lang,") ) {
$temp = explode(",", $value);
if (isset($temp[0]) && $temp[0]!="" && isset($temp[1]) && $temp[1]!="") {
$_GET['lang'] = $temp[1];
$_REQUEST['lang'] = $temp[1];
$lang = $temp[1];
}
unset($url_array[$key]);
}
}

// $option/$task/$sectionid/$id/$Itemid/$limit/$limitstart
if (isset($url_array[$pos+6]) && $url_array[$pos+6]!="") {
$task = $url_array[$pos+1];
$sectionid = $url_array[$pos+2];
$id = $url_array[$pos+3];
$Itemid = $url_array[$pos+4];
$limit = $url_array[$pos+5];
$limitstart = $url_array[$pos+6];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$_GET['sectionid'] = $sectionid;
$_REQUEST['sectionid'] = $sectionid;
$_GET['id'] = $id;
$_REQUEST['id'] = $id;
$_GET['Itemid'] = $Itemid;
$_REQUEST['Itemid'] = $Itemid;
$_GET['limit'] = $limit;
$_REQUEST['limit'] = $limit;
$_GET['limitstart'] = $limitstart;
$_REQUEST['limitstart'] = $limitstart;
$QUERY_STRING = "option=com_content&task=$task&sectionid=$sectionid&id=$id&Itemid=$Itemid&limit=$limit&limitstart=$limitstart";
// $option/$task/$id/$Itemid/$limit/$limitstart
} else if (isset($url_array[$pos+5]) && $url_array[$pos+5]!="") {
$task = $url_array[$pos+1];
$id = $url_array[$pos+2];
$Itemid = $url_array[$pos+3];
$limit = $url_array[$pos+4];
$limitstart = $url_array[$pos+5];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$_GET['id'] = $id;
$_REQUEST['id'] = $id;
$_GET['Itemid'] = $Itemid;
$_REQUEST['Itemid'] = $Itemid;
$_GET['limit'] = $limit;
$_REQUEST['limit'] = $limit;
$_GET['limitstart'] = $limitstart;
$_REQUEST['limitstart'] = $limitstart;
$QUERY_STRING = "option=com_content&task=$task&id=$id&Itemid=$Itemid&limit=$limit&limitstart=$limitstart";
// $option/$task/$sectionid/$id/$Itemid
} else if (!(isset($url_array[$pos+5]) && $url_array[$pos+5]!="") && isset($url_array[$pos+4]) && $url_array[$pos+4]!="") {
$task = $url_array[$pos+1];
$sectionid = $url_array[$pos+2];
$id = $url_array[$pos+3];
$Itemid = $url_array[$pos+4];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$_GET['sectionid'] = $sectionid;
$_REQUEST['sectionid'] = $sectionid;
$_GET['id'] = $id;
$_REQUEST['id'] = $id;
$_GET['Itemid'] = $Itemid;
$_REQUEST['Itemid'] = $Itemid;
$QUERY_STRING = "option=com_content&task=$task&sectionid=$sectionid&id=$id&Itemid=$Itemid";
// $option/$task/$id/$Itemid
} else if (!(isset($url_array[$pos+4]) && $url_array[$pos+4]!="") && (isset($url_array[$pos+3]) && $url_array[$pos+3]!="")) {
$task = $url_array[$pos+1];
$id = $url_array[$pos+2];
$Itemid = $url_array[$pos+3];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$_GET['id'] = $id;
$_REQUEST['id'] = $id;
$_GET['Itemid'] = $Itemid;
$_REQUEST['Itemid'] = $Itemid;
$QUERY_STRING = "option=com_content&task=$task&id=$id&Itemid=$Itemid";
// $option/$task/$id
} else if (!(isset($url_array[$pos+3]) && $url_array[$pos+3]!="") && (isset($url_array[$pos+2]) && $url_array[$pos+2]!="")) {
$task = $url_array[$pos+1];
$id = $url_array[$pos+2];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$_GET['id'] = $id;
$_REQUEST['id'] = $id;
$QUERY_STRING = "option=com_content&task=$task&id=$id";
// $option/$task
} else if (!(isset($url_array[$pos+2]) && $url_array[$pos+2]!="") && (isset($url_array[$pos+1]) && $url_array[$pos+1]!="")) {
$task = $url_array[$pos+1];
$_GET['task'] = $task;
$_REQUEST['task'] = $task;
$QUERY_STRING = "option=com_content&task=$task";
}

if ($lang!="") {
$QUERY_STRING .= "&lang=$lang";
}

$_SERVER['QUERY_STRING'] = $QUERY_STRING;
$REQUEST_URI = $uri[0]."index.php?".$QUERY_STRING;
$_SERVER['REQUEST_URI'] = $REQUEST_URI;
}

/*
Components
http://www.domain.com/component/$name,$value
*/
if (in_array("component", $url_array)) {

$uri = explode("component/", $_SERVER['REQUEST_URI']);
$uri_array = explode("/", $uri[1]);
$QUERY_STRING = "";

foreach($uri_array as $value) {
$temp = explode(",", $value);
if (isset($temp[0]) && $temp[0]!="" && isset($temp[1]) && $temp[1]!="") {
$_GET[$temp[0]] = $temp[1];
$_REQUEST[$temp[0]] = $temp[1];
$QUERY_STRING .= $temp[0]=="option" ? "$temp[0]=$temp[1]" : "&$temp[0]=$temp[1]";
}
}

$_SERVER['QUERY_STRING'] = $QUERY_STRING;
$REQUEST_URI = $uri[0]."index.php?".$QUERY_STRING;
$_SERVER['REQUEST_URI'] = $REQUEST_URI;
}
// Extract to globals
while(list($key,$value)=each($_GET)) $GLOBALS[$key]=$value;
// Don't allow config vars to be passed as global
include( "configuration.php" );
}

function sefRelToAbs( $string ) {
GLOBAL $mosConfig_live_site, $mosConfig_sef, $mosConfig_mbf_content;

global $iso_client_lang;
if( $mosConfig_mbf_content && $string!="index.php" &&
!eregi("^(([^:/?#]+):)",$string) && !strcasecmp(substr($string,0,9),"index.php") &&
!eregi("lang=", $string) ) {
$string .= "&lang=$iso_client_lang";
}

if ($mosConfig_sef && !eregi("^(([^:/?#]+):)",$string) && !strcasecmp(substr($string,0,9),"index.php")) {

// Replace all & with &
$string = str_replace( '&', '&', $string );

/*
Home
index.php
*/
if ($string=="index.php") {
$string="";
}

$sefstring = "";
if ( (eregi("option=com_content",$string) || eregi("option=content",$string) ) && !eregi("task=new",$string) && !eregi("task=edit",$string) ) {
/*
Content
index.php?option=com_content&task=$task&sectionid=$sectionid&id=$id&Itemid=$Itemid&limit=$limit&limitstart=$limitstart
*/
$sefstring .= "content/";
if (eregi("&task=",$string)) {
$temp = split("&task=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&sectionid=",$string)) {
$temp = split("&sectionid=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&id=",$string)) {
$temp = split("&id=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&Itemid=",$string)) {
$temp = split("&Itemid=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&limit=",$string)) {
$temp = split("&limit=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&limitstart=",$string)) {
$temp = split("&limitstart=", $string);
$temp = split("&", $temp[1]);
$sefstring .= $temp[0]."/";
}
if (eregi("&lang=",$string)) {
$temp = split("&lang=", $string);
$temp = split("&", $temp[1]);
$sefstring .= "lang,".$temp[0]."/";
}
$string = $sefstring;
} else if (eregi("option=com_",$string) && !eregi("option=com_registration",$string) && !eregi("task=new",$string) && !eregi("task=edit",$string)) {
/*
Components
index.php?option=com_xxxx&...
*/
$sefstring = "component/";
$temp = split("\?", $string);
$temp = split("&", $temp[1]);
foreach($temp as $key => $value) {
$sefstring .= $value."/";
}
$string = str_replace( '=', ',', $sefstring );
}
//echo $mosConfig_live_site."/".$string;
return $mosConfig_live_site."/".$string;
} else {
return $string;
}

}
?>

istrya
Expert
Expert
Messages : 303

lun. juil. 24, 2006 8:23 am  

N'utilisant pas Mambo et n'ayant pas trop mater son code source je peux pas trop t'aider... sinon essayes de demander de l'aider sur un forum de la communauté mambo. Ils seront peut-être mieux te répondre que moi ;).

  •   Information
  • Qui est en ligne ?

    Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 7 invités