neos / redirecthandler

The Neos.RedirectHandler package for Flow
MIT License
4 stars 15 forks source link

Redirect for host without any source path #37

Closed mwitte closed 5 years ago

mwitte commented 5 years ago

Hi, currently I think it's not possible to add a redirect without any source path? Of cause I can do this by server configuration but I think it would be nice to add this functionality in this package.

Scenario: I need a redirect for a host only if there is no request path. This redirect should only match if there is no request path

Example: redirect should match for:

redirect should not match for:

Also there should be the possibility to add a redirect for a host which matches for all possible request paths, something like https://mydomain.tld/* but this is not my current issue.

Sebobo commented 5 years ago

Hi, thanks for creating the topic.

This seems to be a duplicate of #12. But as you have more details, I will close the other one.

Sebobo commented 5 years ago

As I already wrote in #12 it might be possible to do this already with the following configuration change:

This might be possible now if you change the order of the routing:

Neos:
  Flow:
    http:
      chain:
        process:
          chain:
            redirect:
              position: 'before routing'
              component: Neos\RedirectHandler\RedirectComponent

Can you try that?

mwitte commented 5 years ago

thank you very much :)