AEM SPA URL Shorten in Model Exporter | Community
Skip to main content
Level 2
Aug 9, 2022 8:45 AM UTC
Solved

AEM SPA URL Shorten in Model Exporter

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

 

 

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Mohit_KBansal
Mohit_KBansalAccepted solution
Employee
Aug 9, 2022 9:51 AM UTC

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

2 replies

Mohit_KBansal
Mohit_KBansalAccepted solution
Employee
Aug 9, 2022 9:51 AM UTC

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

Translate
Level 2
Aug 9, 2022 11:57 AM UTC

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

 

Translate