Difference between revisions of "Return (nginx.conf)"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
* http://nginx.org/en/docs/http/ngx_http_rewrite_module.html | * http://nginx.org/en/docs/http/ngx_http_rewrite_module.html | ||
− | |||
− | |||
− | |||
− | + | [[HTTP]] to [[HTTPS]] redirection example: | |
+ | |||
+ | server { | ||
+ | listen 80 default_server; | ||
+ | |||
+ | server_name _; | ||
+ | |||
+ | return 301 https://$host$request_uri; | ||
+ | } | ||
− | |||
− | |||
− | |||
== Related terms == | == Related terms == |
Revision as of 16:43, 26 August 2021
HTTP to HTTPS redirection example:
server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; }
Related terms
- Configure HTTP to HTTPs redirection with Nginx
- AWS ALB: Redirect (AWS::ElasticLoadBalancingV2::Listener)
rewrite
See also
Advertising: