4

“config.yaml”文件中的示例:

locations:
  ...
  some_location_root:
    location: /
    try_files:
      - $uri
      - '@rwr'

  some_location_rewrite:
    location: '@rwr'
    rewrite: '^(.*) /index.php?_controller=$1 last'
  ...
4

1 回答 1

3

我在这里找到了解决方案: 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']
于 2015-05-05T07:20:30.690 回答