IIS Custom Error (rewriting urls) and POST data

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

IIS Custom Error (rewriting urls) and POST data

Post 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..
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

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

Post 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.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

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

Post by panic! »

thanks for the reply.

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