Hi All,
We are facing an issue, where the images from DAM are giving 404 NOT FOUND error when accessed via Dispatcher (We are using AMS in our Project).
We debugged and found that the issue is appearing as we have name of images as "abc.JPG" instead of "abc.jpg" in AEM. These images are being sent via Magento, thats the reason it has Largecase chars in the file extension (e.g. JPG).
Approach 1:
We tried to make modification in "ams_publish_filters.any" file to allow an additional extension "JPG" in the "/content", but in AMS its being immutable file we are not able to modify it. Could any one suggest, how this can be overlayed and additional extension can be added in filter.any file.
Approach 2:
Also, I could think of an additional approach, where we modify DAM Update Asset workflow to smallcase the extension (e.g. jpg) upon upload of asset.
Could anyone please suggest, which should be the preferred approach for this.
Thanks..
Regards,
Aman
Views
Replies
Total Likes
You can add the below rewrite rule to force lower case of the URL.
#Rule to ignore Case
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} ^(.*)[A-Z]+(.*)$
RewriteCond %{REQUEST_URI} !.*\..*$
RewriteRule (.*) ${lc:$1} [R,L]
Thanks!
Thanks for the reply @Asutosh_Jena_
If I understood correctly, I suppose its a rewrite rule to update the URL to allow Uppercase..?
Also could you please share in what file should this be updated as we have huge-list of files in AMS that are IMMUTABLE when deploying via Cloud Manager.
Ref: https://helpx.adobe.com/experience-manager/kb/ams-dispatcher-manual/immutable-files.html
Here is a sample response of which files are immutable:
You need to add a custom file and apply the rewrite. This rewrite will force all the URLs to lower case so if your file has JPG it will be converted into jpg and requested from publish.
Thanks!
Hi @Asutosh_Jena_ ,
I followed the same steps, but after adding the shared rewrite rule at the path \dispatcher\src\conf.d\rewrites\custom_rewrites.rules did not resolve the issue.
Regards,
Aman
Do you see your custom rules are getting picked?
Could you pls share, how can I verify that.
Sorry, I am not aware of much dispatcher related steps, Just Learning.
Hi @amanagarwal21 -
You are right, the ams publish filter is immutable. So, you need to have a custom file to update the filter rules. Approach is as below:
1. You need to clone the ams_publish_filters.any file into a custom, project specific filter file like %custom_name%_publish_filters.any.
2. Update this file with the rule to allow 'JPG'.
3. Include this file in your project specific farm.any file.
4. If you don't have a custom farm.any file, then create a custom one like 998_%custom_name%_publish_farm.any by cloning the 999_ams_publish_farm.any file in the available_farms folder.
5. Now create a softlink to the newly created file within the enabled_farms folder, and delete the softlink for 999_ams_publish_farm.any.
Thanks,
Fani
Thanks for the reply @Fanindra_Surat
I have created a custom ignore case rule and added it in custom file \dispatcher\src\conf.d\rewrites\custom_rewrite.rules file
Kindly let me know, if I need to do any further steps of vhost/ farm as well and pls let know the steps post this, if possible.
Thanks a lot.
Regards,
Aman
Hi,
you can create another cutsom file which allow to add custom filters and add this file to publish farm.
Custom file : /dispatcher/src/conf.dispatcher.d/filters/custom_publish_filters.any
Filter section in publihs farm file
/etc/httpd/conf.dispatcher.d/filters/custom_publish_filters.any
Views
Likes
Replies
Views
Likes
Replies