Avoid redirect by adding www to the URL

Currently, the script is not working because the server is responding with a redirect to the home page, when the www is not specified.