如何将本地主机定向到 hybris 中的 mystorefront?
How to direct localhost to mystorefront in hybris?
现在,当我转到 https://localhost:9002/
时,它会打开 hac (hybris admin console).
当我去https://powertools.local:9002/nystorefront/powertools/en/USD/cart
时,我可以到达我的店面。
我想在 localhost:9002
时到达 mystore
。
我该怎么办?
我假设您的网络扩展名是 mystorefront.
将这些添加到您的 config/local.properties
# This way hac extension will be available on https://localhost:9002/hac instead of https://localhost:9002/
hac.webroot=/hac
# If you want to remap the context path to the root site on the web container
# then you must set these values to be blank, do not set them to be '/'
mystorefront.webroot=
storefrontContextRoot=
还要确保与您的 CMSSite 关联的 urlPatterns 允许您通过以下方式访问您的店面:https://localhost:9002/
您还可以在 mystorefront/project.properties 中找到此属性和其他信息。
正如那里已经提到的,“如果你想改变这些值,那么建议你覆盖两个
它们在您的 config/local.properties 文件中,而不是在此处更改值。
您必须在 local.properties 文件中配置 webroot 和 storefrontContextRoot。
1) 将属性添加到您的 config/local.properties,将 mystorefront
(mystorefront.webroot) 更改为您的店面名称。另外,需要将 hac webroot 更改为 /hac
hac.webroot=/hac
mystorefront.webroot=
storefrontContextRoot=
2) 要打开您的站点而不传递查询参数(?site=mysite),运行 下面的 Impex。将 mysite
更改为您的 CMSSite 名称。这也将解决您的错误(找不到与当前 URL 关联的 CMSSite)。
$siteUid=mysite
# CMS Site
INSERT_UPDATE CMSSite ; uid[unique=true] ; urlPatterns ;
; $siteUid ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://[^/].*$ ;
现在,当我转到 https://localhost:9002/
时,它会打开 hac (hybris admin console).
当我去https://powertools.local:9002/nystorefront/powertools/en/USD/cart
时,我可以到达我的店面。
我想在 localhost:9002
时到达 mystore
。
我该怎么办?
我假设您的网络扩展名是 mystorefront.
将这些添加到您的 config/local.properties
# This way hac extension will be available on https://localhost:9002/hac instead of https://localhost:9002/
hac.webroot=/hac
# If you want to remap the context path to the root site on the web container
# then you must set these values to be blank, do not set them to be '/'
mystorefront.webroot=
storefrontContextRoot=
还要确保与您的 CMSSite 关联的 urlPatterns 允许您通过以下方式访问您的店面:https://localhost:9002/
您还可以在 mystorefront/project.properties 中找到此属性和其他信息。 正如那里已经提到的,“如果你想改变这些值,那么建议你覆盖两个 它们在您的 config/local.properties 文件中,而不是在此处更改值。
您必须在 local.properties 文件中配置 webroot 和 storefrontContextRoot。
1) 将属性添加到您的 config/local.properties,将 mystorefront
(mystorefront.webroot) 更改为您的店面名称。另外,需要将 hac webroot 更改为 /hac
hac.webroot=/hac
mystorefront.webroot=
storefrontContextRoot=
2) 要打开您的站点而不传递查询参数(?site=mysite),运行 下面的 Impex。将 mysite
更改为您的 CMSSite 名称。这也将解决您的错误(找不到与当前 URL 关联的 CMSSite)。
$siteUid=mysite
# CMS Site
INSERT_UPDATE CMSSite ; uid[unique=true] ; urlPatterns ;
; $siteUid ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://[^/].*$ ;