Hello friends,
I am using ACS Commons Sitemap Servlet to generate sitemap xml which looks like..
I want to get rid of /content/site/ from the url as this is how our urls are in production so that it looks like
https://<Domain Name>/testing.html
Could anyone please advise how can I achieve that?
SitemapServlet config looks like. Anything I can put here?
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
exclude.property="hideInNav"
externalizer.domain="publicSecure"
sling.servlet.resourceTypes="sometemplate"/>
Thanks and Regards
Deepak
Solved! Go to Solution.
I don't think ACS commons can remove it, but you can always add an resource resolver config for your runmode like below , worked fine.
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" resource.resolver.searchpath="[/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary]" resource.resolver.manglenamespaces="{Boolean}true" resource.resolver.allowDirect="{Boolean}true" resource.resolver.required.providers="org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory" resource.resolver.virtual="/:/" resource.resolver.mapping="[/content/project/</]" resource.resolver.map.location="/etc/map" resource.resolver.default.vanity.redirect.status="{Long}302" resource.resolver.enable.vanitypath="{Boolean}true" resource.resolver.optimize.alias.resolution="{Boolean}true" />
It will remove /content/project from generated sitemap.
I don't think ACS commons can remove it, but you can always add an resource resolver config for your runmode like below , worked fine.
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" resource.resolver.searchpath="[/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary]" resource.resolver.manglenamespaces="{Boolean}true" resource.resolver.allowDirect="{Boolean}true" resource.resolver.required.providers="org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory" resource.resolver.virtual="/:/" resource.resolver.mapping="[/content/project/</]" resource.resolver.map.location="/etc/map" resource.resolver.default.vanity.redirect.status="{Long}302" resource.resolver.enable.vanitypath="{Boolean}true" resource.resolver.optimize.alias.resolution="{Boolean}true" />
It will remove /content/project from generated sitemap.
Hi edubey,
Sorry for replying late. Thanks a lot for posting this solution. It worked for me.
Regards,
Deepak
Views
Likes
Replies
Views
Likes
Replies