chughes741 / webserv

HTTP server written in C++
2 stars 0 forks source link

Handle Http Redirect #101

Closed francislah closed 9 months ago

francislah commented 1 year ago

In the configuration you can list a return value for a server:

server {
  # Redirect to HTTPS
  listen      80;
  server_name domain.com www.domain.com;
  return      301 https://example.com$request_uri;
}

Any connections to this server should just return the error code and the new URL as the body.