来自“config.yaml”文件的示例:
locations:
...
some_location_root:
location: /
try_files:
- $uri
- '@rwr'
some_location_rewrite:
location: '@rwr'
rewrite: '^(.*) /index.php?_controller=$1 last'
...
最佳答案
我在这里找到了解决方案:
https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb
rewrite: '^(.*) /index.php?_controller=$1 last'
应该看起来像:
rewrite_rules: ['^(.*) /index.php?_controller=$1 last']
关于nginx - 如何在从 PuPHPet 生成的配置文件中设置 Nginx 重写规则?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30011857/