acs-aem-commons icon indicating copy to clipboard operation
acs-aem-commons copied to clipboard

Redirect with filename extension not working in from field

Open brianclaveau-coresecure opened this issue 2 years ago • 2 comments

Required Information

  • [ ] AEM Cloud Version: Adobe Experience Manager 2023.11.14227.20231108T162349Z-231000
  • [ ] ACS AEM Commons Version: 6.0.14
  • [ ] Reproducible on Latest? unknown

Expected Behavior

ACS AEM Commons -> Manage Redirects Add '/programs.php' as a source for the redirect and have the redirect trigger with the extension httpt://www.domain.com/programs.php

Actual Behavior

None of the redirects file if the source includes an extension, I have tried /programs.php /programs.pdf /programs.txt None of these will trigger

These relative paths do work as the From /NotRealRedirect/ /NotRealRedirect

Steps to Reproduce

Go to ACS AEM Commons -> Manage Redirects Add any filename for the source field /filename.txt and then a destination, "/" and it wlll not work

Links

n/a

brianclaveau-coresecure avatar Nov 15 '23 17:11 brianclaveau-coresecure

By default the Redirect Filter listens on the /content path. You need to change it to listen from the root:

image

With this config it works fine to me:

yegor.kozlov:~ curl -I http://localhost:4503/programs.php
HTTP/1.1 302 Found
Location: /content/we-retail/en.html
Content-Length: 0

YegorKozlov avatar Nov 17 '23 16:11 YegorKozlov

Thank you for reply. We are using the AEM Cloud and have updated the path from /content to /

The redirect is still not working. Here are the settings pulled from the Environment

      "jmx.objectname": "com.adobe.acs.commons:type=Redirect Manager",
      "mapUrls": true,
      "osgi.ds.satisfying.condition.target": "(osgi.condition.id=true)",
      "paths": "/",
      "preserveExtension": false,
      "preserveQueryString": true,
      "service.description": "A request filter implementing support for virtual redirects",
      "service.pid": "com.adobe.acs.commons.redirects.filter.RedirectFilter",
      "service.ranking": 1900,
      "sling.filter.scope": "REQUEST"

brianclaveau-coresecure avatar Nov 28 '23 21:11 brianclaveau-coresecure