4

Example from "config.yaml" file:

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

  some_location_rewrite:
    location: '@rwr'
    rewrite: '^(.*) /index.php?_controller=$1 last'
  ...
Markus Amalthea Magnuson
  • 7,701
  • 4
  • 38
  • 49
Slava Melnik
  • 103
  • 7

1 Answers1

3

I found the solution here: https://github.com/jfryman/puppet-nginx/blob/master/spec/defines/resource_location_spec.rb

rewrite: '^(.*) /index.php?_controller=$1 last'

Should look like:

rewrite_rules: ['^(.*) /index.php?_controller=$1 last']
Slava Melnik
  • 103
  • 7
  • How to handle multiple rules? I tried rewrite_rules: ['first', 'second'] but it does not work for me :/ Any ideas? – wiesson May 19 '15 at 10:02