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 に答える