Skip to content

Instantly share code, notes, and snippets.

@basz
Created July 26, 2012 12:48
Show Gist options
  • Select an option

  • Save basz/3181843 to your computer and use it in GitHub Desktop.

Select an option

Save basz/3181843 to your computer and use it in GitHub Desktop.
$this->app->getEventManager()->attach('dispatch', function($e) use ($uri) {
$response = new HttpResponse();
$response->getHeaders()->addHeaderLine('Location', rawurldecode((string) $uri));
$response->setStatusCode(302);
return $response;
}, 9999);
Rattletrap:logs bas$ curl -I --location http://rattletrap-juffrouwjansen-studio.nl/
HTTP/1.1 200 OK
Date: Thu, 26 Jul 2012 12:19:22 GMT
Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c DAV/2 PHP/5.3.12
X-Powered-By: PHP/5.3.12
Set-Cookie: PHPSESSID=qbkqgjb0m4h5pjcahpr153keu5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://rattletrap-juffrouwjansen-hoofddorp.nl:80/?requestMasterSessUri=http://rattletrap-juffrouwjansen-studio.nl:80/
Content-Type: text/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment