RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/.]+)/?(.*)$ /$1.php/$2 [QSA,L]
+RewriteRule ^api/([a-z]+)/([a-z]+) /api/$1_$2.php
</IfModule>
+++ /dev/null
-# Allow PHP_AUTH_USER with CGI script
-# (Inspired by http://www.yetanothercommunitysystem.com/article-321-regle-comment-utiliser-l-authentification-http-en-php-chez-ovh )
-
-<IfModule mod_rewrite.c>
-RewriteEngine on
-RewriteRule ^tags/get tags_get.php
-RewriteRule ^tags/rename tags_rename.php
-RewriteRule ^posts/dates posts_dates.php
-RewriteRule ^posts/get posts_get.php
-RewriteRule ^posts/recent posts_recent.php
-RewriteRule ^posts/all posts_all.php
-RewriteRule ^posts/update posts_update.php
-RewriteRule ^posts/add posts_add.php
-RewriteRule ^posts/delete posts_delete.php
-RewriteRule ^export/html export_html.php
-RewriteRule ^export/csv export_csv.php
-
-RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
-</IfModule>