问题描述
现在,当我转到https://localhost:9002/
时,它将打开hac (hybris admin console).
Now when I go to https://localhost:9002/
it opens hac (hybris admin console).
当我去https://powertools.local:9002/nystorefront/powertools/en/USD/cart
时,我可以到达我的店面.
When I go to https://powertools.local:9002/nystorefront/powertools/en/USD/cart
I can reach my storefront.
我想去localhost:9002
时到达mystore
.
我该怎么办?
推荐答案
您必须在local.properties文件中配置webroot和storefrontContextRoot.
You have to configure webroot and storefrontContextRoot in local.properties file.
1)将属性添加到config/local.properties,用店面名称更改mystorefront
(mystorefront.webroot).另外,需要将hac webroot更改为/hac
1) Add properties to your config/local.properties, change mystorefront
(mystorefront.webroot) with your storefront name. Also, need to change hac webroot to /hac
hac.webroot=/hac
mystorefront.webroot=
storefrontContextRoot=
2)要打开您的站点而不传递查询参数(?site = mysite),请运行以下Impex.用您的CMSSite名称更改mysite
.这也可以解决您的错误(找不到与当前URL相关联的CMSSite ).
2) To open your site without passing query parameter(?site=mysite), run the below Impex. Change mysite
with your CMSSite name. This will also resolve your error(Cannot find CMSSite associated with current URL).
$siteUid=mysite
# CMS Site
INSERT_UPDATE CMSSite ; uid[unique=true] ; urlPatterns ;
; $siteUid ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://[^/].*$ ;
这篇关于如何在hybris中将localhost定向到mystorefront?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!