.html removal for live url
Hi,
We have a requirement to remove .html from end user urls while retaining cacheability.
The approach which we followed is
- Checked Strip HTML Extension under Day CQ Link Checker Transformer in Felix console.
- Created a sling mapping with sling:internalRedirect as /content/mycompany/amer/us/en/xyz/$1.html, $1.html (string array)
- Added below configurations to create cache at dispatcher level
RewriteCond %{REQUEST_FILENAME} !.
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{HTTP_ACCEPT} ^.html.$
RewriteRule ^([^.][^./]) # .)?$ $1.html$2 [PT,QSA]
The issues which we are facing are
- Images with extensions like .jpg and .png are not loading.
- Unable to open pages under /etc/replication for example Agents on Publish, Agents on Author, Activate Tree.
- With the above dispatcher configurations, cache gets created but custom rewrite rules are not working.
for example thesetype of rules are not working RewriteRule ^/(.*)$ /content/mycompany/amer/us/en/xyz/$1 [PT]
Is there a way to achieve stripping html for few sites and retain for others without checking option Strip HTML Extension under Day CQ Link Checker Transformer in Felix console?
Any help on this is highly appreciated.
Thanks & Regards,
Srikanth Pogula