nginx重写文件位置


nginx rewrite file location

在我的应用程序中,我试图将http://domain.com/accounts/login/accounts/register链接到http://domain.com/accounts.php?action=$,其中$是:http://domain.com/accounts/$

我不知道在哪里定义重写以及写什么。

我可以通过SSH访问整个VPS,但我不确定要编辑什么文件。那么文件在哪里呢?

我检查了/opt/文件夹,它似乎是空的。我可能正在运行lighttpd,所以你能在这两种情况下帮我吗?否则,你能告诉我如何检查我是否使用lighttpd吗。

rewrite /accounts/(login|register) /accounts.php?action=$1

应该做到这一点。将其放入server(或location)指令中。