Symptoms

There are a few issues with vanity URL that do not meet your requirements -- specifically (1) centralized control over the vanity URL and (2) underscore character in the name of the path is not supported. Is there a work around for these?

Cause

The vanity URL field is currently associated with each page and management become extremely difficult. This localized control of vanity URL can be removed by remove the vanity URL field.

In addition, there is a bug the code the handle Vanity URL in which underscore are not allowed. A fix is currently being worked on by R&D in future release of CQ.

Resolution

As an alternative to vanity URL, the Sling /etc/map can be used to provide similar functionality to vanity URL. An example /etc/map has been provided to show such functionality. In the example, requesting the page  http://<host>:<port>/content/geometrixx/en/civil_justice.html will return the page http://<host>:<port>/content/geometrixx/en/law-and-business.html .

The structure of /etc/map is as follows:

/etc [sling:Folder]
   /map [sling:Folder]
      /http [sling:OrderedFolder]
         /civil_justice [sling:Mapping]
            - sling:internalRedirect="[/content/geometrixx/en/law-and-business.html]"
            - sling:match="\[^/]+/content/geometrixx/en/civil_justice.html"

NOTE: Each additional mapping will require a separate sling:Mapping node with any arbitrary name.

Applies to

CQ 5.2.x, 5.3, 5.4

다운로드

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책