Issue
- We would like to remove the web/guest part of the URL, to shorten it
e.g. http://www.example.com/web/guest/home-> http://www.example.com/home
Environment
- Liferay Portal 6.2
- Liferay DXP 7.0-7.4
Resolution
The default public Site base URL is https://localhost:8080/web/<site-friendly-url>
, and the private one is https://localhost:8080/group/<site-friendly-url>
To remove these parts from the URL, you have to specify your domain as a virtual host of your site:
- You have to go to
- DXP 7.0-7.3: Admin Menu > Configuration > Site Settings section > drop-down the "Site URL" portion of the configuration page
- DXP 7.4: Admin Menu > Configuration > Site Settings section > Site Configuration > click on "Site URL" in the left side
- You have to specify virtual hosts for the public and private pages.
- e.g. add www.example.com to public pages
- Now the Home page opens as http://www.example.com/home
Note: If you want to test this on your local computer, you will have to modify the /etc/hosts file to include the custom domain (www.example.com) to point to 127.0.0.1