{"action":"created","issue":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/195","labels_url":"https://api.github.com/repos/neos/flow-development-collection/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/neos/flow-development-collection/issues/195/comments","events_url":"https://api.github.com/repos/neos/flow-development-collection/issues/195/events","html_url":"https://github.com/neos/flow-development-collection/pull/195","id":124774858,"number":195,"title":"FEATURE: Configurable Redirects","user":{"login":"dfeyer","id":221173,"avatar_url":"https://avatars.githubusercontent.com/u/221173?v=3","gravatar_id":"","url":"https://api.github.com/users/dfeyer","html_url":"https://github.com/dfeyer","followers_url":"https://api.github.com/users/dfeyer/followers","following_url":"https://api.github.com/users/dfeyer/following{/other_user}","gists_url":"https://api.github.com/users/dfeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/dfeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfeyer/subscriptions","organizations_url":"https://api.github.com/users/dfeyer/orgs","repos_url":"https://api.github.com/users/dfeyer/repos","events_url":"https://api.github.com/users/dfeyer/events{/privacy}","received_events_url":"https://api.github.com/users/dfeyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neos/flow-development-collection/labels/I:%20WIP","name":"I: WIP","color":"eb6420"},{"url":"https://api.github.com/repos/neos/flow-development-collection/labels/P:%20Flow","name":"P: Flow","color":"0052cc"},{"url":"https://api.github.com/repos/neos/flow-development-collection/labels/T:%20PHP","name":"T: PHP","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"dfeyer","id":221173,"avatar_url":"https://avatars.githubusercontent.com/u/221173?v=3","gravatar_id":"","url":"https://api.github.com/users/dfeyer","html_url":"https://github.com/dfeyer","followers_url":"https://api.github.com/users/dfeyer/followers","following_url":"https://api.github.com/users/dfeyer/following{/other_user}","gists_url":"https://api.github.com/users/dfeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/dfeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfeyer/subscriptions","organizations_url":"https://api.github.com/users/dfeyer/orgs","repos_url":"https://api.github.com/users/dfeyer/repos","events_url":"https://api.github.com/users/dfeyer/events{/privacy}","received_events_url":"https://api.github.com/users/dfeyer/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-01-04T15:05:13Z","updated_at":"2016-01-08T19:46:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neos/flow-development-collection/pulls/195","html_url":"https://github.com/neos/flow-development-collection/pull/195","diff_url":"https://github.com/neos/flow-development-collection/pull/195.diff","patch_url":"https://github.com/neos/flow-development-collection/pull/195.patch"},"body":"Adds a new entity \"Redirection\" and a RedirectionService that enables\r\nbasic administration of redirects.\r\n\r\nThe RedirectionService will be triggered *before* the Routing Framework\r\nkicks in and redirects to any configured target URI if applicable.\r\nIt however is only invoked when no cached route matches the current\r\nrequest. Thus, if a redirection is added, depending route cache entries\r\nare flushed automatically.\r\n\r\nCurrently redirects can only be managed via new commands::\r\n\r\n    ./flow redirection:list\r\n    ./flow redirection:create source/path target/path\r\n    ./flow redirection:remove source/path\r\n    ./flow redirection:removeall\r\n\r\nThe plan is, however, to create them automatically as soon as related\r\nroutes become obsolete due to changed entities for example.\r\n\r\nRelated: NEOS-721"},"comment":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/comments/170104855","html_url":"https://github.com/neos/flow-development-collection/pull/195#issuecomment-170104855","issue_url":"https://api.github.com/repos/neos/flow-development-collection/issues/195","id":170104855,"user":{"login":"gerhard-boden","id":10533739,"avatar_url":"https://avatars.githubusercontent.com/u/10533739?v=3","gravatar_id":"","url":"https://api.github.com/users/gerhard-boden","html_url":"https://github.com/gerhard-boden","followers_url":"https://api.github.com/users/gerhard-boden/followers","following_url":"https://api.github.com/users/gerhard-boden/following{/other_user}","gists_url":"https://api.github.com/users/gerhard-boden/gists{/gist_id}","starred_url":"https://api.github.com/users/gerhard-boden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerhard-boden/subscriptions","organizations_url":"https://api.github.com/users/gerhard-boden/orgs","repos_url":"https://api.github.com/users/gerhard-boden/repos","events_url":"https://api.github.com/users/gerhard-boden/events{/privacy}","received_events_url":"https://api.github.com/users/gerhard-boden/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T19:46:56Z","updated_at":"2016-01-08T19:46:56Z","body":"hi @dfeyer \r\nagain ran some tests today.\r\nAfter adding a route with hostURI my test instance broke with the exception `Call to a member function getHostPattern() on string`. Can't really test any further because of this now, but this is what my http chain settings look like, since the redirects did not fire yesterday:\r\n```\r\npreprocess:\r\n    position: 'before process'\r\n    chain: {  }\r\nprocess:\r\n    chain:\r\n        routing:\r\n            position: start\r\n            component: TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent\r\n        dispatching:\r\n            component: TYPO3\\Flow\\Mvc\\DispatchComponent\r\n        ajaxWidget:\r\n            position: 'before routing'\r\n            component: TYPO3\\Fluid\\Core\\Widget\\AjaxWidgetComponent\r\n        redirection:\r\n            position: 'before routing'\r\n            component: Neos\\RedirectHandler\\RedirectionComponent\r\npostprocess:\r\n    chain:\r\n        standardsCompliance:\r\n            position: end\r\n            component: TYPO3\\Flow\\Http\\Component\\StandardsComplianceComponent\r\n```\r\n\r\nWhen writing the redirects to the database the `sourceuripath` contains a full URL including the protocol. By default this seems to be `http://`. When a site is running with TLS this may cause problems or additional redirects. (very often all http://some.thing requests are redirected to https://some.thing). Can't we just use the same protocol that the incoming request used? "}}