Invalid syntax generated when using URL Rewriting with braces
Closed this issue · 1 comments
DennisTT commented
I tried to enter in a original URL path of ^/update/([0-9]{4,5})$
.
The syntax generated in the nginx conf is:
rewrite ^/update/([0-9]{4,5})$ /update.php?id=$1 last;
nginx config syntax test fails with the following error and nginx cannot be (re-)started.
nginx: [emerg] directive "rewrite" is not terminated by ";" in /etc/nginx/sites-enabled/example.com.conf:42
Workaround: Manually putting quotes around the regex solves it temporarily:
rewrite "^/update/([0-9]{4,5})$" /update.php?id=$1 last;
jcameron commented
Thanks for pointing this out - it will be fixed in the next release of the Nginx plugin.