nginx redirects and rewrites
- by ptheofan
I'm closing a website but want to maintain a couple of urls working plus a static html file to serve as index. All old urls should redirect to root (/) except a couple of chosen locations.
Here's an example of what I need to do
All should give 301 permanent to /
http:://www.domain.tld/whatever/anything/realy == 301 ==> http://www.domain.tld
http:://www.domain.tld/blabla == 301 ==> http://www.domain.tld
http:://www.domain.tld/ == 301 ==> http://www.domain.tld
except for
http://www.domain.tld/special.html == serve ==> special.html
root should serve the defailt file (as specificed in index)
http:://www.domain.tld == serve => somefile.html