I'd like to rewrite the following path https://example.org/app/my/index.php?param=/foo/bar/ to https://example.org/app/my/foo/bar and retrieve $_GET['param'] in php using .htaccess.
The parameter has to be modular so it can be any path. And I would like to keep the ability to add other parameter like https://example.org/app/my/foo/bar/?id=XY
The .htaccess-file is in /app/my/.
I already tried this, but it didn't worked out
RewriteEngine On
RewriteRule ^(app/my/[\w-]+)/([\w-]+)/?$ $1.php?param=$2 [L,NC,QSA]