############### # Set RewriteBase to your folder. # If set to root folder RewriteBase just takes '/' value ############### Options +FollowSymlinks RewriteEngine On # RewriteBase /linea21_v2.0/public/ RewriteBase /public/ # if the requested path is a real file or directory, we don't rewrite anything RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Match http://localhost/linea21/actualite.html # Pattern : $_REQUEST['rub'] .html RewriteRule ^([a-zA-Z0-9-]*)\.html$ index.php?rub=$1 [L] # Match http://localhost/linea21/actualite/5.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR $_REQUEST['id'] .html RewriteRule ^([a-zA-Z0-9-]*)/([0-9]*)\.html$ index.php?rub=$1&id=$2 [L] # Match http://localhost/linea21/actualite/ou-sarretera-letalement-urbain,5.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [NAME],$_REQUEST['id'] .html RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*),([0-9]*)\.html$ index.php?rub=$1&id=$3 [L] # Match http://localhost/linea21/directory/-6-.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [ $_REQUEST['debut']] .html RewriteRule ^([a-zA-Z0-9-]*)/-([0-9]*)-\.html$ index.php?rub=$1&debut=$2 [L] # Match http://localhost/linea21/tableau-de-bord/taux-daccroissement-de-la-population,22/1.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [NAME , -optional],$_REQUEST['id'] $_REQUEST['parentid'] .html RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*),([0-9]*)/([0-9]*)\.html$ index.php?rub=$1&id=$3&parentid=$4 [L] # Match http://localhost/linea21/actualite/ou-sarretera-letalement-urbain,5.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [NAME , -optional] $_REQUEST['id'] URI_SEPARATOR $_REQUEST['parentid'] URI_SEPARATOR $_REQUEST['parentparentid'] .html RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*),([0-9]*)/([0-9]*)\.html$ index.php?rub=$1&id=$3&parentid=$4 [L] # Match http://localhost/linea21/actualite/ou-sarretera-letalement-urbain,5.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [NAME , -optional],$_REQUEST['id'] $_REQUEST['parentid'] .html RewriteRule ^([a-zA-Z0-9-]*)/([a-zA-Z0-9-]*),([0-9]*)/([0-9]*)/([0-9]*)\.html$ index.php?rub=$1&id=$3&parentid=$4&parentparentid=$5 [L] # Match http://localhost/linea21/directory/@level/environnement,3.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR @$_REQUEST['filter'] URI_SEPARATOR NAME , $_REQUEST['id'] .html RewriteRule ^([a-zA-Z0-9-]*)/@([a-zA-Z]*)/([a-zA-Z0-9-]*),([0-9]*)\.html$ index.php?rub=$1&filter=$2&id=$4 [L] # Match http://localhost/linea21/directory/@alpha/P.html # Pattern: $_REQUEST['rub'] URI_SEPARATOR NAME @$_REQUEST['filter'] URI_SEPARATOR $_REQUEST['id'] .html RewriteRule ^([a-zA-Z0-9-]*)/@([a-zA-Z]*)/([a-zA-Z0-9-]*)\.html$ index.php?rub=$1&filter=$2&id=$3 [L]