File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,32 @@ server {
44
55 root /htdocs;
66
7+ # Serve index.html
8+ location = / {
9+ try_files /index.html =404;
10+ }
11+
712 # Exact generated redirects
813 include includes/jira-to-github-redirects.conf;
914
1015 # Generic fallback rewrites
11- rewrite ^/issue/([0-9]+)$ https://issues.jenkins.io/browse/JENKINS-$1 permanent;
12- rewrite ^/issue/([A-Z]+-[0-9]+)$ https://issues.jenkins.io/browse/$1 permanent;
13- rewrite ^/([A-Z]+-[0-9]+)$ https://issues.jenkins.io/browse/$1 permanent;
14- rewrite ^/browse/([A-Z]+-[0-9]+)$ https://issues.jenkins.io/browse/$1 permanent;
16+ # /issue/12345
17+ location ~ ^/issue/([0-9]+)$ {
18+ return 301 https://issues.jenkins.io/browse/JENKINS-$1;
19+ }
20+
21+ # /issue/JENKINS-12345 or /issue/INFRA-123
22+ location ~ ^/issue/([A-Z]+-[0-9]+)$ {
23+ return 301 https://issues.jenkins.io/browse/$1;
24+ }
25+
26+ # /JENKINS-12345 or /INFRA-123
27+ location ~ ^/([A-Z]+-[0-9]+)$ {
28+ return 301 https://issues.jenkins.io/browse/$1;
29+ }
1530
16- return 404;
31+ # /browse/JENKINS-12345 or /browse/INFRA-123
32+ location ~ ^/browse/([A-Z]+-[0-9]+)$ {
33+ return 301 https://issues.jenkins.io/browse/$1;
34+ }
1735}
You can’t perform that action at this time.
0 commit comments