没有slug的URL重写(我正在使用API​​)

I am trying to rewrite a URL of example.com/movies/movie.php?id=12345 to something like example.com/movies/spider-man-homecoming for example.

The issue is that all my data is provided through an API and nothing is stored on my server. As the only data I have is the ID. I have access to the .htaccess but not any other configuration files (as it is shared hosting) - I can of course change any of the files like movie.php or create a new file - if necessary.

Is it still possible to rewrite a URL like that somehow?

it is possible but I don't recommend doing it. You could write some middleware or just some script that will match the url request to the id. Maybe something like:

request url -> use rewrite to pass it to some php file -> inside do data request and match the url to the the retrieved data.

It has massive setback like, data request time needed added to the response request, not to mention match processing time. I guess network traffic will be your bottleneck.