Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
454 stars 600 forks source link

Redirect with filename extension not working in from field #3212

Open brianclaveau-coresecure opened 11 months ago

brianclaveau-coresecure commented 11 months ago

Required Information

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

YegorKozlov commented 11 months ago

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
brianclaveau-coresecure commented 11 months ago

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"