Customizing site url using Hybris

三世轮回 提交于 2019-12-13 02:17:54

问题


I'm using Hybris 5.7 and I would like to customize my websites localhost URL.

Current URL is: https://localhost:9001/storefront

Desired URL : https://localhost:9001/

Thanks


回答1:


First, find webroot in your *storefront extension's local.properties file

you will see something like

mystorefront.webroot=/mystorefront
storefrontContextRoot=/mystorefront

Remove /mystorefront, so it will be

mystorefront.webroot=
storefrontContextRoot=

Now, you have to correct website & media URLs similarly by removing /mystorefront. Search for the website & media in same project.properties. Please note, below mysite is the uid of CMSSite so it will be different in your case. you will see something like

website.mysite.http=http://localhost:9001/mystorefront
website.mysite.https=https://localhost:9001/mystorefront

media.mysite.http=http://localhost:9001/mystorefront
media.mysite.https=https://localhost:9001/mystorefront

Change this to

website.mysite.http=http://localhost:9001
website.mysite.https=https://localhost:9001

media.mysite.http=http://localhost:9001
media.mysite.https=https://localhost:9001

Make sure, you haven't declared the same properties in local.properties file, otherwise it's better to make changes to local.properties file.

Once you done with the changes, do ant clean all and start your server.



来源:https://stackoverflow.com/questions/53840096/customizing-site-url-using-hybris

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!