Opened 4 months ago

Closed 4 months ago

#1789 closed defect (invalid)

regexp rewrite rule does not recognize semicolon at end

Reported by: dalu@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.15.x
Keywords: regexp, rewrite Cc:
uname -a: Linux private 5.1.5-arch1-2-ARCH #1 SMP PREEMPT Mon May 27 03:37:39 UTC 2019 x86_64 GNU/Linux
nginx -V: nginx/1.16.0

Description

This following rewrite rule

rewrite ^/([^/]*)_([a-zA-Z0-9]{9}).html$ /watch.php?vid=$2;

leads to
[emerg] 32212#32212: directive "rewrite" is not terminated by ";" in /etc/nginx/vhosts/rewrite.conf:47

It's part of a PHP Melody rewrite ruleset, which is under a non-public licence.

The same applies to
nginx version: nginx/1.14.2
Linux private 5.1.4-gentoo #1 SMP Fri May 24 13:57:49 CEST 2019 x86_64 Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz GenuineIntel? GNU/Linux

Change History (1)

comment:1 Changed 4 months ago by mdounin

  • Resolution set to invalid
  • Status changed from new to closed

Quoting docs:

If a regular expression includes the “}” or “;” characters, the whole expressions should be enclosed in single or double quotes.

Note: See TracTickets for help on using tickets.