How is the mapping done from …/script.php?one,1 to …/script/one/2?

There is a PHP script which evaluates one or two parameters via QUERY_STRING. This script should process the parameters via QUERY_PATH. The PHP file type should be omitted.

Request of the form https://example.org/script.php?bla,1 should be converted to https://example.org/script/bla/1.

I think the first part can be accomplished by using

RewriteCond %{REQUEST_URI} ^/script\.php$   RewriteCond %{QUERY_STRING} ^(\w+)(?:,(\w+))?$   RewriteRule .* /script/%1/%2? [R=301,L] 

What must be done so that the script without file extension processes the forwarded request? I’ve tried Multiviews and ForceType – but to no avail.

It is an Apache installation version 2.4. The PHP interpreter runs in CGI mode. There is only access to the .htaccess configuration.