and then change script.php to process $_SERVER[REQUEST_URI] when it gets
the special value E=READ_THE_REQUEST, so that it populates a, b, c, d,
and ext as is appropriate.
In fact, I suspect that I’d not use rewrite at all: either fastcgi_pass
directly in this location; or proxy_pass sending the original $uri as
an argument.
(There are cases where this “location” is not a drop-in replacement for
the initial "rewrite"s. If your system is one of those, you’ll need a
different plan.)
But if your rewrite system works and is clear enough for you, you
probably
don’t need to change it.