我应该如何制作 URL 路由器?

How should I make a URL router?

我的问题是 url 路由器是如何制造的,我的意思是通过路由器而不是人们从 https://www.example.com/cgi-bin/test.py they could access it for example from the url https://www.example.com/something/otherthing/test

访问我的脚本

这是一个网络服务器配置项。

在 Apache 中,您将在服务器的配置文件中使用 ScriptAlias 命令。

<Location "/cgi-bin">
    ScriptAlias "/something/otherthing/"
</Location>

https://httpd.apache.org/docs/2.4/mod/mod_alias.html#scriptalias