Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location_custom_cfg only allows 1 rewrite #861

Closed
csdougliss opened this issue Aug 30, 2016 · 0 comments
Closed

location_custom_cfg only allows 1 rewrite #861

csdougliss opened this issue Aug 30, 2016 · 0 comments

Comments

@csdougliss
Copy link

csdougliss commented Aug 30, 2016

location_custom_cfg only allows 1 rewrite, but I want to do several rewrites. How can I do this with only 1 location rewrite like so instead of creating several nginx::resource::location?

nginx::resource::location { '@rewrite1':
        ensure              => present,
        vhost               => 'demo.https',
        ssl                 => true,
        ssl_only            => true,
        location_custom_cfg => {
            'rewrite' => '^/([a-z0-9_.]+)/$ /index.php?module=$1',
            'rewrite' => '^/*(.+/)?([^.]*[^/])$ http://$http_host/$1$2/ redirect',
            'rewrite' => '^/([a-z0-9_.]+)/([a-z0-9_.]+)/$ /index.php?module=$1&action=$2',
            'rewrite' => '^/([a-z0-9_.]+)/([a-z0-9_.]+)/([-a-zA-Z0-9_.\ /]+)/$ index.php?module=$1&action=$2&option=$3',
            'rewrite' => '^/([a-z0-9_.]+)/([a-z0-9_.]+)/([-a-zA-Z0-9_.\ /]+)/([-a-zA-Z0-9_.\ ]+)/*$ index.php?module=$1&action=$2&option=$3&param=$4',
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant