{"action":"opened","issue":{"url":"https://api.github.com/repos/zendframework/zf1/issues/643","labels_url":"https://api.github.com/repos/zendframework/zf1/issues/643/labels{/name}","comments_url":"https://api.github.com/repos/zendframework/zf1/issues/643/comments","events_url":"https://api.github.com/repos/zendframework/zf1/issues/643/events","html_url":"https://github.com/zendframework/zf1/issues/643","id":117680121,"number":643,"title":"Port number doesn't survive a redirect","user":{"login":"nroper","id":479971,"avatar_url":"https://avatars.githubusercontent.com/u/479971?v=3","gravatar_id":"","url":"https://api.github.com/users/nroper","html_url":"https://github.com/nroper","followers_url":"https://api.github.com/users/nroper/followers","following_url":"https://api.github.com/users/nroper/following{/other_user}","gists_url":"https://api.github.com/users/nroper/gists{/gist_id}","starred_url":"https://api.github.com/users/nroper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nroper/subscriptions","organizations_url":"https://api.github.com/users/nroper/orgs","repos_url":"https://api.github.com/users/nroper/repos","events_url":"https://api.github.com/users/nroper/events{/privacy}","received_events_url":"https://api.github.com/users/nroper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-18T20:59:08Z","updated_at":"2015-11-18T20:59:08Z","closed_at":null,"body":"I have a Windows development machine with an Ubuntu VM set up via Vagrant. The VM has Nginx running on port 80 and the Vagrant configuration maps port 8080 on the host Windows machine to port 80 on the VM. For various reasons the project that I'm working uses 127.0.0.1 instead of localhost so, in my browser on the Windows machine, I hit a URL such as:\r\n\r\nhttp://127.0.0.1:8080/foo/bar/baz\r\n\r\nThe application on the VM is built with Zend Framework 1.12.\r\n\r\nIf I click a link that has an href=\"/foo/bar/baz\" then all is fine and I go to:\r\n\r\nhttp://127.0.0.1:8080/foo/bar/baz\r\n\r\nHowever, if in one of my controllers I use a redirect to \"/foo/bar/baz\" then the browser loads:\r\n\r\nhttp://127.0.0.1/foo/bar/baz - i.e without the port in it.\r\n\r\nIf I then manually edit the URL in the browser's address bar to add the port and hit enter then the page comes up correctly.\r\n\r\nI've tried various ways of doing the redirect in ZF, and even tried typing a hard coded URL into the code, but whatever I do it always strips out the port component when the redirect takes place.\r\n\r\nIs there a way of achieving the redirect and keeping the port?\r\n\r\nThanks"}}