Mapping package for redirection to another internal page for removal of .html

Avatar

Avatar
Validate 1
Level 1
vinodprathipati
Level 1

Likes

0 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
vinodprathipati
Level 1

Likes

0 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
vinodprathipati
Level 1

30-03-2020

Hi Guys,

 

We have a requirement to remove all .html extensions in website for best SEO practices, we have removed all .html with help of dispatcher rules and corresponding mapping.

 

But we have an issue with redirect pages which adding .html by default.

For e.g.  https://mywebsite.com/redirectPage/ (redirect page to home)

is redirect to https://mywebsite.com/home.html 

 

We have tried mapping package for internal redirection but havent worked. Please find below mapping package rules.

 

sling:match = ".+/home.html"

sling:redirect = "/home/"

 

But it is not working as expected (going to blank package even though we have correct internalmapping for /home/)

please let us know if i have done anything wrong above or give me a way to rectify this issue.(Note: let me know if we can do it without help of dispatcher rules)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

30-03-2020

Answers (0)