Enable extensionless URL on cloud author | Community
Skip to main content
New Participant
August 8, 2023
Solved

Enable extensionless URL on cloud author

  • August 8, 2023
  • 1 reply
  • 763 views

Hi All,

 

We have a requirement to enable extensionless URL. Though to implement and check this first on cloud author. 

I am doing the changes in etc/map/https folder

Added below rules 

sling:internalRedirect : /content/testproject/(.*).html

sling:match: /content/testproject/(.*)$

 

When I tried to access page with no extension and no slash at the end of url, It is throwing forbidden error.

 

Do I need to point 

resource.resolver.map.location to etc/map to the org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl? 
 
Please help what configuration am I missing here.

 

Thanks,

Pradeep 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

aanchal-sikka
New Participant
August 8, 2023

Hello @pradeepdubey82 

 

Have you tried following OSGi config?

"Strip HTML Extension" configuration in "Day CQ Link Checker Transformer" 

 

 

Aanchal Sikka
New Participant
August 8, 2023

Hi Anchal,

 

In my local author it is working fine, above configuration will strip the html on anchor links.

However issue I am facing on cloud where changes are not working and what are the changes/rules dispatcher would require.  I have 3 requirements.

1. Url ends with slash www.mysite/en/

should remove last slash and render the home page which is located at www/mysite/en/home.html without showing at browser url

2. Url ends with page name www.mysite/en/home

Should redirect to www.mysite.com/en/home.html however browser url remains same

3. All internal page links/anchor links should work like #2

 

Thanks,

Pradeep

aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
August 8, 2023