mercsen
mercsen

Reputation: 692

redirect a post request in IE using 307

i have a serious issue with our beloved Internet Explorer.

i have the following redirect:

RewriteRule ^add/(.*)/$ /_ucp/moduls/$1/add/add.php [L,R=307]

R=308 causes a complete server crash, don't know why (this is the last row in the htacces file)

the definition for 307 is

In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. For instance, a POST request repeated using another POST request

(http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)

THE PROBLEM:

i think the definition is clear and impossible to missunderstand, thous the damn IE redirects using a GET method! All my post data is lost!

I tracked the redirect using the F12 developer tools.

Does anyone know how to fix / workaround this problem. I really don't want to use cryptic urls in my sourcecode :(

Thank you very much :)

Upvotes: 1

Views: 2521

Answers (1)

Jon Lin
Jon Lin

Reputation: 143876

Assuming you're using apache, version 2.2 doesn't support redirecting with the 308 code (307 is supported). However, apache 2.4 does support redirecting with the 308 code (at least 2.4.3 does). The 308 code is in experimental status, so you're unlikely to see wide adoption at this point.

According to this MSDN blog, IE versions 6-10 handle the 307 redirect silently. I tested this on a copy of IE 9.0.12, and when a POST request was responded with a 307 redirect, the location URL was requested with a POST request like it's supposed to.

Upvotes: 1

Related Questions