Skip to content

Commit

Permalink
fix: redirect to non www url
Browse files Browse the repository at this point in the history
Signed-off-by: Avior <[email protected]>
  • Loading branch information
Aviortheking committed May 30, 2024
1 parent 88e012e commit c19d592
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ events {
}

http {
# Redirect from non-www to www
# server {
# server_name ~^(?!www\.)(?<domain>.+)$;
# return 301 https://www.$domain$request_uri;
# }
# Redirect from www to non-www
server {
server_name ~^www\.(?<domain>.+)$;
return 301 https://$domain$request_uri;
}
server {
listen 3000;
listen [::]:3000;
Expand Down

0 comments on commit c19d592

Please sign in to comment.