I have content page test-define.html hosted on AEM whose url is (example) www.test.in/test-define but this can also be accessed using www.test.in/test-define.mnbbbbbbvfghj or https://www.test.in/content/test-website/language-masters/en/test1/test1-India/home/test-define.html. The issue exist on both stage and prod environment. How to rectify it?
Solved! Go to Solution.
Views
Replies
Total Likes
@_groovy can you check from your filter.any file if you have any specfic rules to allow * selectors in the url for ex: it should not below like *.*.html
/0014 { /type "allow" /method "POST" /url "/content/*.*.html" } # allow POSTs to form selectors under content
And also you need to write the custom rewrite rules to shoten the url
#Shorten the URL
RewriteRule ^/content/${CONTENT_FOLDER_NAME}/(.*).html$ $1.html [R,L]
@_groovy can you check from your filter.any file if you have any specfic rules to allow * selectors in the url for ex: it should not below like *.*.html
/0014 { /type "allow" /method "POST" /url "/content/*.*.html" } # allow POSTs to form selectors under content
And also you need to write the custom rewrite rules to shoten the url
#Shorten the URL
RewriteRule ^/content/${CONTENT_FOLDER_NAME}/(.*).html$ $1.html [R,L]
https://www.test.in/content/test-website/language-masters/en/test1/test1-India/home/test-define.html. can be fixed by defining proper filter rules in dispatcher.
/0100 { /type "deny" /extension "html" /path "/content/test-website/*" }
Similarly for www.test.in/test-define.mnbbbbbbvfghj
Deny all access. Then allow based on selectors and extensions
/0251 { /type "allow" /selectors "abc" /extension "json" /path "/content/test-website/*" }
It seems that the question is incomplete. Could you clarify what you are aiming to rectify or achieve? What specific requirements do you have in mind? If you are referring to shortening URLs and preventing the use of certain selectors, then I believe the answers are quite self-explanatory.
You should block any other selectors that you deem inappropriate.
You have the option to incorporate a RewriteCond to abbreviate and reconstruct the complete AEM path.
Both of these situations are already handled by default in the AEM Project Archetype, so I suggest you review the following resource as a guideline:
Hopefully, this helps.
Aim is to nullify all the gibberish urls and accept only Example: http://www.test.in/test-define (consider this url is for live environment)
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies