{"action":"created","issue":{"url":"https://api.github.com/repos/kiboit/phast/issues/75","repository_url":"https://api.github.com/repos/kiboit/phast","labels_url":"https://api.github.com/repos/kiboit/phast/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/kiboit/phast/issues/75/comments","events_url":"https://api.github.com/repos/kiboit/phast/issues/75/events","html_url":"https://github.com/kiboit/phast/issues/75","id":336556699,"node_id":"MDU6SXNzdWUzMzY1NTY2OTk=","number":75,"title":"URL rewrites for LocalRetriever","user":{"login":"mkosturkov","id":8509908,"node_id":"MDQ6VXNlcjg1MDk5MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/8509908?v=4","gravatar_id":"","url":"https://api.github.com/users/mkosturkov","html_url":"https://github.com/mkosturkov","followers_url":"https://api.github.com/users/mkosturkov/followers","following_url":"https://api.github.com/users/mkosturkov/following{/other_user}","gists_url":"https://api.github.com/users/mkosturkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mkosturkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkosturkov/subscriptions","organizations_url":"https://api.github.com/users/mkosturkov/orgs","repos_url":"https://api.github.com/users/mkosturkov/repos","events_url":"https://api.github.com/users/mkosturkov/events{/privacy}","received_events_url":"https://api.github.com/users/mkosturkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mkosturkov","id":8509908,"node_id":"MDQ6VXNlcjg1MDk5MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/8509908?v=4","gravatar_id":"","url":"https://api.github.com/users/mkosturkov","html_url":"https://github.com/mkosturkov","followers_url":"https://api.github.com/users/mkosturkov/followers","following_url":"https://api.github.com/users/mkosturkov/following{/other_user}","gists_url":"https://api.github.com/users/mkosturkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mkosturkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkosturkov/subscriptions","organizations_url":"https://api.github.com/users/mkosturkov/orgs","repos_url":"https://api.github.com/users/mkosturkov/repos","events_url":"https://api.github.com/users/mkosturkov/events{/privacy}","received_events_url":"https://api.github.com/users/mkosturkov/received_events","type":"User","site_admin":false},"assignees":[{"login":"mkosturkov","id":8509908,"node_id":"MDQ6VXNlcjg1MDk5MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/8509908?v=4","gravatar_id":"","url":"https://api.github.com/users/mkosturkov","html_url":"https://github.com/mkosturkov","followers_url":"https://api.github.com/users/mkosturkov/followers","following_url":"https://api.github.com/users/mkosturkov/following{/other_user}","gists_url":"https://api.github.com/users/mkosturkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mkosturkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkosturkov/subscriptions","organizations_url":"https://api.github.com/users/mkosturkov/orgs","repos_url":"https://api.github.com/users/mkosturkov/repos","events_url":"https://api.github.com/users/mkosturkov/events{/privacy}","received_events_url":"https://api.github.com/users/mkosturkov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-06-28T10:06:24Z","updated_at":"2018-06-28T14:42:25Z","closed_at":null,"author_association":"MEMBER","body":"Like so:\r\n\r\n~~~php\r\n    'retrieverMap' => [\r\n        $_SERVER['HTTP_HOST'] => [\r\n            'root' => Request::fromGlobals()->getDocumentRoot(),\r\n            'rewrite' => ['^/pub/static/version\\d+/' => '/pub/static/']\r\n        ]\r\n    ],\r\n~~~"},"comment":{"url":"https://api.github.com/repos/kiboit/phast/issues/comments/401059074","html_url":"https://github.com/kiboit/phast/issues/75#issuecomment-401059074","issue_url":"https://api.github.com/repos/kiboit/phast/issues/75","id":401059074,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTA1OTA3NA==","user":{"login":"mkosturkov","id":8509908,"node_id":"MDQ6VXNlcjg1MDk5MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/8509908?v=4","gravatar_id":"","url":"https://api.github.com/users/mkosturkov","html_url":"https://github.com/mkosturkov","followers_url":"https://api.github.com/users/mkosturkov/followers","following_url":"https://api.github.com/users/mkosturkov/following{/other_user}","gists_url":"https://api.github.com/users/mkosturkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mkosturkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkosturkov/subscriptions","organizations_url":"https://api.github.com/users/mkosturkov/orgs","repos_url":"https://api.github.com/users/mkosturkov/repos","events_url":"https://api.github.com/users/mkosturkov/events{/privacy}","received_events_url":"https://api.github.com/users/mkosturkov/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T14:42:25Z","updated_at":"2018-06-28T14:42:25Z","author_association":"MEMBER","body":"Turns out we already support multiple prefixes for different roots. Adding support for regexes will do the trick.\r\n\r\nUsage:\r\n~~~php\r\n    $map = [\r\n            'kibo.test' => [\r\n                '/dir1' => '/the-dir-1',\r\n                '/dir2' => '/the-dir-2',\r\n                '/pub/version\\d+/' => '/var/www/pub',\r\n                '/dir~' => '/dir-tilde',\r\n                'dir3' => '/the-dir-3',\r\n                'dir4/' => '/the-dir-4',\r\n                '/dir1/subdir' => '/the-sub-dir'\r\n            ]\r\n        ];\r\n~~~"}}
{"actor":{"display_login":"mkosturkov"}}