Skip to content

Commit

Permalink
fix: redirect query string correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD committed May 7, 2020
1 parent fca16ac commit b749ef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ server {

# Dont lowercase docs and redirect /docs/ to specific item
if ($request_uri ~* "^(.*/)docs/(.*)") {
return 301 https://docs.REPLACE_ALIAS_ZONE_NAME/docs/api-documentation.html#tag/$2$is_args$args;
return 301 https://docs.REPLACE_ALIAS_ZONE_NAME/docs/api-documentation.html#tag/$2;
}

# Dont lowercase docs and redirect /docs to docs
Expand All @@ -119,7 +119,7 @@ server {

# https://stackoverflow.com/questions/40810219/nginx-301-redirect-with-query-string
if ($request_uri ~* "^(.*/)api/(.*)") {
return 301 https://api.REPLACE_ALIAS_ZONE_NAME/$2$is_args$args;
return 301 https://api.REPLACE_ALIAS_ZONE_NAME/$2;
}

location ~ /\.git {
Expand Down

0 comments on commit b749ef3

Please sign in to comment.