举个例子,你将如何实现:
A。将 www.mysite.com 的点击翻译为 www.mysite.com/en 并
b.将上面的 www.mysite.com/en 翻译为 /content/mysite/en.html
这是一个完整的例子
- 看看上面的帖子本地调度程序设置
https://stackoverflow.com/questions/38954232/aem-security-environments-checklist/38955425#38955425 https://stackoverflow.com/questions/38954232/aem-security-environments-checklist/38955425#38955425
- 将本地主机设置为域名(w.r.t 操作系统 Windows 7)
- 与本地调度程序映射域名
- AEM 中的 etc/maps 设置用于缩短内容路径(请记住,我们可以根据您的要求对 etc/maps 正则表达式设置进行多种变体。)
本地主机到域名
更改主机文件中的设置,如下图所示。
Add entries of your like name as the domain names as shown below
example.
Access the project via the domain name as shown in the below screenshot. Your pages should be render as below.
与本地调度程序映射域名
Open the dispatcher.any
file (if you have separated the farms related to module open the specific site related farm file in my case it is)
Make sure your virtualhost allows your domain name in the below screenshot “*” represents to allow all hosts. (Else if you want to allow only the specific domain names specify instead of *)
通过 etc/map 缩短内容路径
可以手动创建 etc/maps 节点,如下面的屏幕截图所示
(或者您可以使用一些第三方开发的插件来创建它们http://cognifide.github.io/Carty/ http://cognifide.github.io/Carty/)
Add a virtual host entries in your dispatcher.any
file or in a separate virtualhost file.
In my case I have added them in a separate file. And enabled the file include in the httpd.conf file. Also enable the rewrite module else virtualhost file enrty rewrite will not work.
请务必注意突出显示的重写规则和 SetHandler 配置,这些是正确呈现页面的关键规则,否则请求可能会在调度程序级别本身停止,而不会传播到 AEM 的发布实例。
完成上述所有配置后,没有任何错误,您应该可以看到我们首页的域名访问了。所有其他页面应通过隐藏已在 etc/maps 中配置的内容路径,以简短形式的 url 呈现
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)