Expand my Community achievements bar.

SOLVED

Enable extensionless URL on cloud author

Avatar

Level 6

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 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Community Advisor

Hello @pradeepdubey82 

 

Have you tried following OSGi config?

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

 

aanchalsikka_0-1691478256883.png

 


Aanchal Sikka

Avatar

Level 6

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

Avatar

Correct answer by
Community Advisor