Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM : How to extend the vanity URL?

Avatar

Avatar
Level 1
ForrestLi
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
ForrestLi
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
ForrestLi
Level 1

09-06-2020

Hi all,

 

Page : /content/home/welcome

Vanity URL : wel

 

If I enter the https://docker.demo.com/wel , The browser will redirect me to https://docker.demo.com/content/home/welcome.html.  But I want browser redirect me to the https://docker.demo.com/home/welcome.html .

 

Does anyone know how to extend Vanity to achieve this function?

 

Thanks,

Forrest

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
Employee
surabhikatiyar
Employee

Likes

68 likes

Total Posts

46 posts

Correct Reply

18 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Boost 50
Employee
surabhikatiyar
Employee

Likes

68 likes

Total Posts

46 posts

Correct Reply

18 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile
surabhikatiyar
Employee

11-06-2020

there are a couple of solutions to achieve this. 

One of the solutions is:-

1. Create a servlet in AEM to create the vanity paths present under the project hierarchy. 

2. Create a shell script in apache to hit the above AEM servlet on a periodic basis and save it in a file(vanity_urls.txt) on apache.

3. Create the re-write rules at the Apache level in httpd.conf file.

These rules will check whether the path requested exists in the file (vanity_urls.txt) and based on the result will do the shortening conditionally.

Answers (3)

Answers (3)

Avatar

Avatar
Boost 5
Level 2
adobe57138
Level 2

Likes

6 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile

Avatar
Boost 5
Level 2
adobe57138
Level 2

Likes

6 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile
adobe57138
Level 2

09-06-2020

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

09-06-2020

There are many ways to achieve your requirement. If you need to redirect all pages, you might want to do that activities son Apache/Dsipacther level.

If this is for some pages only you can employ Vanity URL field on the Page Properties dialog 

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

440 likes

Total Posts

1,016 posts

Correct Reply

115 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

440 likes

Total Posts

1,016 posts

Correct Reply

115 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

09-06-2020

I think as @adobe57138 you might have to look at resource mapping.