【发布时间】:2015-12-10 14:03:04
【问题描述】:
我在将以下 htaccess 规则转换为 nginx 时遇到问题。我的网站是用 PHP 编写的。
重写引擎开启
重写规则 ^([a-zA-Z0-9-/]+).html$ fullstory.php?url=$1
重写规则 ^([a-zA-Z0-9-/]+).html/$ fullstory.php?url=$1
我正在尝试将这个 URL http://example.com/blog/fullstory.php?url=african-vegetable-recipe.html 转换为 http://example.com/blog/african-vegetable-recipe.html
或
从 example.com/blog/african-vegetable-recipe.html 获取“african-vegetable-recipe.html”并用作查询字符串。
nginx 可以处理这个吗?
【问题讨论】: