如何防止暴露 AEM 中的内容层次结构路径?我正在寻找 AEM 级别和调度程序级别的替代方案

2023-12-25

举个例子,你将如何实现: A。将 www.mysite.com 的点击翻译为 www.mysite.com/en 并 b.将上面的 www.mysite.com/en 翻译为 /content/mysite/en.html


这是一个完整的例子

  1. 看看上面的帖子本地调度程序设置 https://stackoverflow.com/questions/38954232/aem-security-environments-checklist/38955425#38955425 https://stackoverflow.com/questions/38954232/aem-security-environments-checklist/38955425#38955425
  2. 将本地主机设置为域名(w.r.t 操作系统 Windows 7)
  3. 与本地调度程序映射域名
  4. AEM 中的 etc/maps 设置用于缩短内容路径(请记住,我们可以根据您的要求对 etc/maps 正则表达式设置进行多种变体。)

本地主机到域名

更改主机文件中的设置,如下图所示。

Add entries of your like name as the domain names as shown below example. enter image description here

Access the project via the domain name as shown in the below screenshot. Your pages should be render as below. enter image description here

与本地调度程序映射域名

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) enter image description here

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 *) enter image description here

通过 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. enter image description here enter image description here

请务必注意突出显示的重写规则和 SetHandler 配置,这些是正确呈现页面的关键规则,否则请求可能会在调度程序级别本身停止,而不会传播到 AEM 的发布实例。

完成上述所有配置后,没有任何错误,您应该可以看到我们首页的域名访问了。所有其他页面应通过隐藏已在 etc/maps 中配置的内容路径,以简短形式的 url 呈现

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何防止暴露 AEM 中的内容层次结构路径?我正在寻找 AEM 级别和调度程序级别的替代方案 的相关文章

  • 如何简化url

    你好 在我的网站中 我发现他们的网址非常简单 例如 http example com questions 4486620 randomaccessfile probelm http example com questions 4486620
  • RewriteRule ^(.*)/$ ?path=$1 [QSA,L] 在我的 .htaccess 中意味着什么?

    我需要在 nginx 中创建重写 就像在我的 htaccess 中所做的那样 并且有一些行我不完全理解 DirectoryIndex index php RewriteEngine on RewriteCond f RewriteRule
  • 为什么我的网站 URL 末尾有双斜杠,如下所示://

    当我输入我的网站 zeugmarket com 时 它显示为https zeugmarket com https zeugmarket com 我编写了这个 htaccess 文件以从 HTTP 转移到 https 但它还在末尾添加了两个斜
  • SEO URL 重写 ASP.NET

    我已经有一个 ASP NET 网站 我想更改我的网站 使其对 SEO 网址更加友好 我想改变前任这个网站 www mydomain aspx articleID 5 到 www mydomain article learningURLrew
  • .htaccess 将一个文件夹中的所有文件重定向到另一个文件夹中的完全相同的文件

    我们只需将名为 音乐 的目录中的每个页面移动到名为 信息 的目录 这是唯一的更改 有很多指向音乐页面的链接 我们不想全部破坏 我不擅长重写条件 基本上 我想做的就是当用户输入 music index php 或 music life myp
  • Routes.rb vsrack-rewrite vs nginx/apache 重写规则

    我的应用程序的前一个版本中的遗留 URL 有数十条重写规则 我看到三个选择 只需在路由文件 config routes rb 中添加 匹配 行 Use 机架重写 https github com jtrupiano rack rewrite
  • 重写后.htaccess图像不显示

    我有一个问题 URL 已被这样重写 RewriteEngine on RewriteCond REQUEST URI index php RewriteRule index php test 1 NC L 我的图像和 CSS 样式都没有被应
  • 多个域到单个网站

    我有多个域指向同一个网站 FFFF com FFFF ca FFFF org 等 重写 FFFF com 所有传入流量的最佳方法是什么 URL 重写还是 301 寻找最佳实践 这两个将在 htaccess 中处理 对吧 Thanks 在这种
  • URL 重写 .htaccess

    我正准备开发一个具有以下 url 结构的网站 我是 url 重写的新手 想知道处理此问题的最佳方法 http domain com index php http domain com about about php http domain
  • Request.Url.Query 和 Request.QueryString 有什么区别?

    我一直在追踪 URL 重写应用程序上的错误 该错误表现为查询字符串中某些变音符号的编码问题 基本上 问题是基本上 search aspx search he m nek 的请求被 search he c5 99m c3 a1nek 的查询字
  • 管理面板的 htaccess 重写规则

    我的网络应用程序中有这样的 url 模式 www mysitename com foldername controller method 所有请求的页面首先被重定向到根文件夹上的index php 然后处理请求的页面 但每当我进入管理面板
  • .htaccess 重写而不影响相对的 image/css/js URL?

    我需要一些有关 htaccess 文件的简单帮助 提前谢谢您 我有很多网站网址 例如 www site com index php page path solutions overview html www site com index p
  • 如何在 Lift 框架中添加新页面

    如何在 lift 中的 webapp 目录中添加一个可供用户访问的新页面 目前只能通过index html访问http localhost 8080 com http localhost 8080 or http localhost 808
  • 用.htaccess重写动态url结构

    我尝试将动态 URL 如下 重写为稍微不同的结构 要么不起作用 要么我不确定它是否正确 旧网址 URL 1 index php lang AAA zone BBB city CCC str DDD search EEE 新网址 URL 11
  • 这个重写规则是什么意思?

    我正在安装 phpancake 有一个像这样的文件夹 application install library public sql schema install html install php 这条规则意味着什么 RewriteEngin
  • Cq5.5 将 servlet 过滤器应用于特定路径

    我正在 cq5 5 中开发自定义表单处理程序 一切都很顺利 我现在正在努力锁定一些安全性 我的任务之一是对表单处理程序路径实施请求限制过滤器 目前我有类似的东西 Component immediate true metatype true
  • 如何在 Rails 应用程序中删除 URL 的尾部斜杠? (在 SEO 视图中)

    为了避免内容重复 我希望避免通过多个 URL 带或不带尾部斜杠 访问我的网站页面 目前 URL catalog product 1 and catalog product 1 导致同一页面 我的目标是将第二个 URL 重定向到第一个 当然是
  • IIS 7 规范 URL 重定向

    我想让一个网站的地址中始终包含 www 并通过 IIS 重写强制执行 例如 test com 将变为 www test com 典型的重写规则示例是
  • 为什么对 CQ 中的每个服务使用 @Component 注解

    我对以下事情有点困惑 我明白 Service and Component注解是我们在OSGi中定义组件或服务时的主要 注解 我指的是http felix apache org documentation subprojects apache
  • org.apache.sling.api.resource,version=[2.3,3) -- 无法解析

    您好 我无法访问我的项目内容 我已经上传了从 CQ 访问内容所需的所有包 我唯一能看到的是 org apache sling api resource version 2 3 3 无法解析 这是否是异常的原因 如果是 请告诉我如何解决 中Q

随机推荐