RewriteEngine On
RewriteBase /PS_Launcher/

# HTTPS forcé (si le mutualisé OVH ne le force pas déjà)
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Pas de listing de répertoires
Options -Indexes

# /PS_Launcher/api      -> api/index.php
# /PS_Launcher/api/foo  -> api/index.php?route=foo
# (passage par query string : pas de PATH_INFO, marche partout)
RewriteRule ^api/?$              api/index.php                        [QSA,L]
RewriteRule ^api/([^?]+)/?$      api/index.php?route=$1               [QSA,L]
