Page 1 of 1

IIS Custom Error (rewriting urls) and POST data

Posted: Fri Oct 17, 2008 8:03 am
by panic!
OK,

I'm rolling a site on an IIS server.

I have set up the equivalent of a mod_rewrite by using a custom 404 error page so that for example

www.example.com/sexy/time/123

is rewritten to

index.php

and index.php obviously routes and dispatches.

it's working just as well as it would on Apache but it seems to lose POST data somehow.

So if I set the action of a form to 'www.example.com/update/123' it will rewrite but won't carry over the POST data.

Anyone know if this is possible?

By the way I know virtually nothing about IIS and Windows in general so maybe this isn't the best way to do it..

Re: IIS Custom Error (rewriting urls) and POST data

Posted: Sat Oct 18, 2008 2:04 am
by Doug G
You may need to capture the post data on your custom error page and then pass it along to the target page.

There are available 3rd party add-on mod_rewrite filters for IIS. I think one is called iis_rewrite.

Re: IIS Custom Error (rewriting urls) and POST data

Posted: Mon Oct 20, 2008 9:45 am
by panic!
thanks for the reply.

I'm currently trying to get my company to lease a dedicated Linux box, I hate Windows.