I am new to Nginx and looking out for a configuration to prepend 'www.' to my rails application url.
For example, if a user submits example.com
into the browser url section the nginx should rewrite the url as www.example.com
and redirect.
Kindly help me achieve this.
Edit
The linked question's answers doesn't serve my requirement since the approach suggested is related to Apache and redirection is performed through ApplicationController
. I request the StackOverflow Community members to interfere, remove the negative reputation points and grant me the required permission to ask more questions.