Skip to content

Instantly share code, notes, and snippets.

@icarrr
Created October 31, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icarrr/24039d1b6e81fa0231b6ed90d738d1ba to your computer and use it in GitHub Desktop.
Save icarrr/24039d1b6e81fa0231b6ed90d738d1ba to your computer and use it in GitHub Desktop.
Configuration redirect root site using nginx

Redirect root site to other site

location = / {
    return 301 http://www.example.com/wiki/Main_Page;
}

Redirect root site to subdirectory in nginx

location = / {
    return 301 https://$host/wal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment