nginx redirection

The index page( was initially rolled out in earlier days of the product to tell visitors what the product was all about. After the app matured enough, there were no reason to keep it there, with an overhead of maintenance on each release.

I therefore decided to make the redirection, with less changes on the architecture of the application. Running on nginx, I simply added rewrite as in following code:

        #more configurations are here
        rewrite ^$request_url?permanent;
        #other configurations go here

The previous code added a permanent redirection from to

These two questions helped me to make my decision:
1. How to redirect to a different domain using NGINX
2. How to redirect requests to a different domain/url with nginx

Show Comments