Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 2

I have a website where the site structure is /content/mysite/us/en/page.html.

 

I have the following sling mapping set up so the site can be served without /content/ in the path at https://example.com/mysite/us/en/page.html:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:mixinTypes="[cq:ReplicationStatus,sling:MappingSpec]"
    jcr:primaryType="nt:folder"
    sling:internalRedirect="[/content/mysite/$1/$2/$3]"
    sling:match="mysite/([a-z]{2})/([a-z]{2})/(.*)"/>

 

The problem is, when I view the site without the /content/ path in the URL, all the links on the page still contain /content/ in them. How do I implement the feature so that /content/ is automatically removed from all link element attributes when the URL does not contain /content/ in it?

 

Thanks.

Who Me Too'd this topic