AddDefaultCharset UTF-8 Options +FollowSymlinks RewriteEngine on #ErrorDocument 400 /databap/index.php?p=error #ErrorDocument 401 /databap/index.php?p=error #ErrorDocument 403 /databap/index.php?p=error #ErrorDocument 404 /databap/index.php?p=error&test=%{REQUEST_URI} #ErrorDocument 500 /databap/index.php?p=error #Read procedure (by id) RewriteRule ^(p|proc|procedure)\-([0-9]+)$ index.php?p=procedure&id=$2 [L] #Add procedure RewriteRule ^(add_proc|add_procedure|p\-|proc\-?|procedure\-?)$ index.php?p=procedure [L] #Read doc (by id) RewriteRule ^(d|doc|documentation)\-([0-9]+)$ index.php?p=doc&id=$2 [L] #Add doc RewriteRule ^(d|doc|documentation)$ index.php?p=doc [L] #Read code (by id/phrase) RewriteRule ^(c|code)\-(.+)$ index.php?p=code&id=$2 [L] #Add Code RewriteRule ^(c\-?|code\-?)$ index.php?p=code [L] #Read article (by id) RewriteRule ^(a|art|article)\-([0-9]+)$ index.php?a=art_redirect&id=$2 [L] #search (by phrase) RewriteRule ^(recherche|search|r|s)\-(.+)$ index.php?p=search&search_words=$2 [L] #Liste RewriteRule ^(liste?)$ index.php?p=list [L] #Profile (by id) RewriteRule ^(u|user|profile?)\-(.+)$ index.php?p=profile&id=$2 [L] #Profile (current user) RewriteRule ^(u\-?|user\-?|profile?\-?)$ index.php?p=profile&id= [L] #Chat (by message id) RewriteRule ^chat\-(.+)$ index.php?p=chat&id=$1 [L] #Chat (current chat) RewriteRule ^(chat|chat\-)$ index.php?p=chat [L] #Options RewriteRule ^options$ index.php?p=options [L] #Eg #prevent www. #RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] #RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L] #E.g RewriteRule ^(.*)\.html $1.php #reading code bytes (by id) #RewriteRule ^(.*)code\-([0-9]+)$ index.php?p=code&id_code=$2 [L] # Jul - deny access to the .git directory RewriteRule \.git - [F,L]