RewriteEngine On # Route all requests to proxy.php with the path as a query parameter RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ proxy.php?path=/$1 [QSA,L] # Also handle direct /health call RewriteRule ^$ proxy.php?path=/health [QSA,L]