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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM SPA URL Shorten in Model Exporter

Avatar

Level 2

Hi,

I understand that there are some limitations on URL rewriting in AEM SPA.

 

But would like to know if there are any other ways or tricks to rewrite and hide actual content path in model exporter json in SPA.

 

Eg  from WKND SPA  sample site. http://localhost:4502/content/wknd-spa-react/us/en/home/page-2/page-3.model.json

Screenshot.png

 

 

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Employee

You can try URL shortening in apache using the apache substitute module [1]

AddOutputFilterByType Substitute text/json
Substitute "s|path:\"\/content\/path\/to\/short\/(.*?)\.html|path:\"/$1.html|i"

 

[1] https://httpd.apache.org/docs/2.4/mod/mod_substitute.html

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

You can try URL shortening in apache using the apache substitute module [1]

AddOutputFilterByType Substitute text/json
Substitute "s|path:\"\/content\/path\/to\/short\/(.*?)\.html|path:\"/$1.html|i"

 

[1] https://httpd.apache.org/docs/2.4/mod/mod_substitute.html

Avatar

Level 2

Hi @Mohit_KBansal , Thanks. This substitute module seems a very good option till Adobe comes up with OOTB support.