Skip to content

Commit a6200c3

Browse files
committed
Fix regex
1 parent 6db1e08 commit a6200c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nginx.conf.sigil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ server {
6262

6363
# Rewrite old style URLs /5/en/ to /5.x/ (remove /en/)
6464
# But keep other languages like /5/ja/ -> /5.x/ja/
65-
location ~ ^/([2-9]|[1-9][0-9]+)/en/(.*)$ {
65+
location ~ "^/([2-9]|[1-9][0-9]+)/en/(.*)$" {
6666
return 301 /$1.x/$2;
6767
}
6868

69-
location ~ ^/([2-9]|[1-9][0-9]+)/([a-z]{2})/(.*)$ {
69+
location ~ "^/([2-9]|[1-9][0-9]+)/([a-z]{2})/(.*)$" {
7070
return 301 /$1.x/$2/$3;
7171
}
7272

7373
# Proxy pass to version specific containers using map
74-
location ~ ^/([2-9]|[1-9][0-9]+)\.x/(.*) {
74+
location ~ "^/([2-9]|[1-9][0-9]+)\.x/(.*)" {
7575
set $version_number $1;
7676
set $request_path $2;
7777

0 commit comments

Comments
 (0)