Hi,
can you please let me know is there a way to make AEM url as case in sensitive. I need to allow both of the below urls.
http://mywebsite.com/content/home.html
http://mywebsite.com/content/homE.html
Thanks
Sam
Solved! Go to Solution.
Hi
Please have a look at this article:-
Link:- https://www.w3.org/TR/WD-html40-970708/htmlweb.html
//According to W3's "HTML and URLs" they should: There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.
All “insensitive”s are boldened for readability.
Domain names are case insensitive according to RFC 4343. The rest of URL is sent to the server via the GET/PUT method. This may be case sensitive or not.
Take this page for example, stackoverflow.com recieves GET string /questions/7996919/should-url-be-case-sensitive, sending a HTML document to your browser. Stackoverflow.com is case insensitive because it produces the same result for /QUEStions/7996919/Should-url-be-case-sensitive.
On the other hand, Wikipedia is case sensitive except the first character of the title. The URLs https://en.wikipedia.org/wiki/Case_sensitivity and https://en.wikipedia.org/wiki/case_sensitivity leads to the same article, but https://en.wikipedia.org/wiki/CASE_SENSITIVITY returns 404.
As Gorg stated, it is not possible directly via AEM and it is also not the Best practices.
In Apache,
In .htaccess
<IfModule mod_speling.c>
CheckSpelling on
</IfModule>
Tested, works, if you have the mod_speling enabled.
Or, in a serverwide httpd.conf:
RewriteEngine On
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
I hope this will help you.
~kautuk
Explore Sling Mapping for this and possibility the use of wildcards:
https://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html
Try with "(?i)[^/]+/content/site1/page1.html"
This should match page1, Page1, PAGE1 etc..
Views
Replies
Total Likes
Hi,
I don't think that this is possible. Also I don't see a good reason why one would have such a feature enabled.
Jörg
I think you can do this in apache
https://www.a2hosting.com/kb/developer-corner/apache-web-server/using-the-mod-speling-apache-module
Or you just to have to make sure that all resource path is in lower case and you can do http://stackoverflow.com/questions/2923658/convert-to-lowercase-in-a-mod-rewrite-rule
Yogesh
Views
Replies
Total Likes
Hi
Please have a look at this article:-
Link:- https://www.w3.org/TR/WD-html40-970708/htmlweb.html
//According to W3's "HTML and URLs" they should: There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.
All “insensitive”s are boldened for readability.
Domain names are case insensitive according to RFC 4343. The rest of URL is sent to the server via the GET/PUT method. This may be case sensitive or not.
Take this page for example, stackoverflow.com recieves GET string /questions/7996919/should-url-be-case-sensitive, sending a HTML document to your browser. Stackoverflow.com is case insensitive because it produces the same result for /QUEStions/7996919/Should-url-be-case-sensitive.
On the other hand, Wikipedia is case sensitive except the first character of the title. The URLs https://en.wikipedia.org/wiki/Case_sensitivity and https://en.wikipedia.org/wiki/case_sensitivity leads to the same article, but https://en.wikipedia.org/wiki/CASE_SENSITIVITY returns 404.
As Gorg stated, it is not possible directly via AEM and it is also not the Best practices.
In Apache,
In .htaccess
<IfModule mod_speling.c>
CheckSpelling on
</IfModule>
Tested, works, if you have the mod_speling enabled.
Or, in a serverwide httpd.conf:
RewriteEngine On
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
I hope this will help you.
~kautuk