RewriteEngine on

RewriteRule (.*)/$ $1 [L,R=301]

RewriteBase /admin/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^langue/([^/]+)$ langue_map.php?id=$1 [L]
#RewriteRule ^translate$ translate.php [L]
#RewriteRule ^accueil$ index.php [L]
#RewriteRule ^preferences$ meslangues.php [L]
#RewriteRule ^langue2/([^/]+)$ langue_map2.php?id=$1 [L]
#RewriteRule ^groupe/([^/]+)$ groupe_detail.php?id=$1 [L]
#RewriteRule ^village/([^/]+)$ village_detail.php?id=$1 [L]

RewriteRule ^([a-zA-Z0-9]+)$ index.php?page=$1 [NC,L]

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?page=$1&cible=$2 [NC,L]

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?page=$1&cible=$2&action=$3 [NC,L]

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?page=$1&cible=$2&action=$3&subaction=$4 [NC,L]

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?page=$1&cible=$2&action=$3&subaction=$4&subsubaction=$5 [NC,L]

#RewriteRule ^([^.]+?)/?$ $1.php [L]
