Skip to content

Instantly share code, notes, and snippets.

@icarrr

icarrr/rewrite.md

Created Oct 31, 2019
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