Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save basz/3181739 to your computer and use it in GitHub Desktop.
Redirects occur as expected when the response headers are like the following...
Rattletrap:logs bas$ curl -I --location http://juffrouwjansen-studio.bushbaby.nl/
HTTP/1.1 302 Found
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.2
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
Set-Cookie: PHPSESSID=rkkjfchvgfdvsocd58tbcld6t3; path=/
Location: http://juffrouwjansen-hoofddorp.bushbaby.nl:80/?requestMasterSessUri=http://juffrouwjansen-studio.bushbaby.nl:80/
Vary: Accept-Encoding
Content-Type: text/html
Date: Thu, 26 Jul 2012 12:18:47 GMT
X-Varnish: 653703447
Age: 0
Via: 1.1 varnish
Connection: keep-alive
HTTP/1.1 302 Found
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.2
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
Set-Cookie: PHPSESSID=l50rda3q9kihmocr26s4ffp2c2; path=/
Location: http://juffrouwjansen-studio.bushbaby.nl:80/?PHPSESSID=l50rda3q9kihmocr26s4ffp2c2
Vary: Accept-Encoding
Content-Type: text/html
Date: Thu, 26 Jul 2012 12:18:48 GMT
X-Varnish: 653703448
Age: 0
Via: 1.1 varnish
Connection: keep-alive
HTTP/1.1 200 OK
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.2
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
Set-Cookie: PHPSESSID=l50rda3q9kihmocr26s4ffp2c2; path=/
Vary: Accept-Encoding
Content-Type: text/html
Date: Thu, 26 Jul 2012 12:18:48 GMT
X-Varnish: 653703449
Age: 0
Via: 1.1 varnish
Connection: keep-alive
// But the headers do not redirect client (safari neither curl)? Why?
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