Skip to content

Instantly share code, notes, and snippets.

@icarrr
Created October 31, 2019 04:46
Embed
What would you like to do?
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