Duff code broke my redirect

In QuadRant’s ‘serious’ life, he has a business and its web site to look after. The site is on WordPress.com but the domain is hosted by a UK ISP. The home page’s registered URL redirects to WordPress via an HTTP 301 permanent redirect script.

This is the proper way to do it, as explained by this article on somacon.com.

Well, everything was fine for three years until one day I typed my domain into Chrome and got an error notice reading:

Duplicate headers received from the server

The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.

Error 350 (net::ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION): Multiple distinct Location headers received. This is disallowed to protect against HTTP response splitting attacks.”

Horrors! And Firefox felt the same way too, although its error message wasn’t so informative. IE9, as you might have guessed, wasn’t bothered about the danger of ‘HTTP response splitting attacks’ and passed me on to the WordPress destination without even a cautionary cough.

It turned out that I had simply omitted to close the script with Response.End when I upgraded it from the simple ASP redirect script that I’d originally cut and pasted from W3Schools. As I’d left the code from my old homepage below the redirect script and not even commented it out, careful browsers ended up with a hatful of headers when they started to take the absence of a Response.End literally.

So let that be a lesson to me. Hope it helps if you are trying to solve the same problem with your site, or need tell someone else that their site is playing up, perhaps they’re looking for a bit of closure too.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s