############### # Set RewriteBase to your folder. # If set to root folder RewriteBase just takes '/' value ############### Options +FollowSymlinks RewriteEngine On # RewriteBase /linea21-d/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/public/chart/id/14/scale/1/w/900/h/600/png # Display charts RewriteRule ^chart/id/([0-9]*)/scale/([0-9]*)/w/([0-9]*)/h/([0-9]*)/png$ ../dashboard/graph.php?id=$1&scale_id=$2&w=$3&h=$4&display=true [L] # Match http://localhost/linea21/actualite.html # Pattern : $_REQUEST['rub'] .html RewriteRule ^([a-zA-Z0-9-]*)\.html$ index.php?rub=$1 [QSA,L] # QSA passes query string so, it also handles /public/contact.html?s=my%email%subject # 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 [QSA,L] # QSA passes query string so, it also handles /public/tableau-de-bord/1.html?altmode=true # Match http://localhost/linea21/liste-discussions/5/-5-.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR $_REQUEST['id'] URI_SEPARATOR - $_REQUEST['debut'] - .html RewriteRule ^([a-zA-Z0-9-]*)/([0-9]*)/-([0-9]*)-\.html$ index.php?rub=$1&id=$2&debut=$3 [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'] URI_SEPARATOR $_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/discussion/message-test,147/5/-5-.html # Pattern : $_REQUEST['rub'] URI_SEPARATOR [NAME , -optional],$_REQUEST['id'] URI_SEPARATOR $_REQUEST['parentid'] URI_SEPARATOR - $_REQUEST['debut'] - .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&debut=$5 [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]*)/([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]