legacy-knowledge-base
公開されました Jun. 30, 2025

How to redirect users accessing www.mydomain.com to mydomain.com in my PaaS environment?

投稿者

Rafael Regner

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • We need to implement a rewrite rule that change the URL in a client request from www.mydomain.com to mydomain.com.
  • How should we proceed to configure this in our PaaS environment?

Environment

  • Liferay PaaS

Resolution

  • Following the Nginx official documentation, you may be able to achieve the desired behavior by adding the following configuration to your nginx.conf file:
    server {
    listen 80;
    server_name www.mydomain.com;
    return 301 $scheme://mydomain.com$request_uri;
    }

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base