Skip to content

Commit

Permalink
feat(nginx-core/redirect): implement redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Nov 20, 2023
1 parent a24c5f0 commit 82350ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
map $request_uri $redirect_uri {
include /etc/nginx/conf.d/redirect.map;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
location / {
if ($redirect_uri) {
return 302 $redirect_uri;
}
}
2 changes: 2 additions & 0 deletions nginx-core/etc/nginx/templates/redirect.map.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# /etc/nginx/conf.d/redirect.map
/example1 /redirected-example;

0 comments on commit 82350ec

Please sign in to comment.