我想映射这样的页面domain/content/myProject/home.html
to domain/home.html
. /content/myProject/
不需要。我有以下代码:
String newpath = getResourceResolver().map(page.getPath());
这不会改变任何事情。新路径是留下来page.getPath()
如何解决这个问题?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
技巧是您将 2 个条目添加到 sling:internalRedirect 作为 / 和 /content/example/
AEM 首先尝试解析第一个条目为“/”的资源。因此,非页面 URL(如 /etc/designs、/content/dam 等)将由第一个条目寻址。如果无法使用第一个条目进行解析,则会使用第二个条目来解析该页面。
与其他技术(如 apache 重定向)相比,这也是 adobe 推荐的 URL 缩短方法。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)