React Components // SPA // Url Shortening

Avatar

Avatar
Validate 1
Level 1
sudesh_16
Level 1

Likes

4 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
sudesh_16
Level 1

Likes

4 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
sudesh_16
Level 1

17-11-2020

Hi,

 

We are creating react components based on SPA framework but we have extended it to be multi-page applications using react based component. Now we want to implement URL shortening. for that, we are creating a mapping in jcr resource resolver mapping and rewrite rules to hide "/content/XXX". Now when we are making a request to page without /content/XXX/en/abc.html like /en/abc.html then all calls are 200 included model.json for the page but the react components are not able to map it where if I make a request /content/XXX/en/abc.html then the same response is coming back but the page is getting rendered.

 

So is there i way that we can implement url shortening for react SPA framework(from official documentation, I understand that this feature is not supported OOTB) but is there any other alternative which we can use to implement the URL shortening.

 

Thanks,

Sudesh

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,450 likes

Total Posts

3,328 posts

Correct reply

943 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,450 likes

Total Posts

3,328 posts

Correct reply

943 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-11-2020

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
neerav_it
Level 1

Likes

2 likes

Total Posts

6 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
neerav_it
Level 1

Likes

2 likes

Total Posts

6 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
neerav_it
Level 1

10-02-2021

we have used vanity URL feature provided by AEM, worked pretty well for us

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

249 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

249 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

18-11-2020

@sudesh_16To me it looks like the reverse mapping is not happening i.e. the subsequent requests are not mapped to the domain. Try adding Sling mappings (/etc/map entries) and that should hopefully take care of reverse mapping.

Avatar

Avatar
Validate 1
Level 1
nasrinj31078225
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 1
View profile

Avatar
Validate 1
Level 1
nasrinj31078225
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 1
View profile
nasrinj31078225
Level 1

15-02-2021

@sudesh_16 , Did you get any solution for the issue? I am also facing same issue.