POST data is missing

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 24 Apr 2012, 21:47

POST data is missing

24 Apr 2012, 22:06

I'm using ISAPI_Rewrite as a means of having user friendly URLs. When I submit a form and then try to read the POST data it is not there. I need to be able to retrieve the form values using request.form("variable"). I added the following condition to the top of all of my rules yet it is still not working.
RewriteCond %{REQUEST_METHOD} !^POST$ [NC]

Any suggestions?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: POST data is missing

25 Apr 2012, 05:05

Hello,

You need to add this condition to the very rule that carries this particular page. It's not that you need to add this line on top and that's it.


Regards
Andrew

User avatar
Posts: 2
Joined: 24 Apr 2012, 21:47

Re: POST data is missing

25 Apr 2012, 10:54

Thanks. I tried that and I was able to retrieve the post data. The next issue I am having is that once the form is submitted and it loads the page again with the form data, it does not display the rewritten url, it shows the old url. Here is the rewrite code I used for my login page:

RewriteRule ^Login$ Login.asp [NC,NS,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_METHOD} !^POST$ [NC]
RewriteRule ^Login\.asp$ Login [NC,R=301,NS,L]

What am I doing wrong?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: POST data is missing

26 Apr 2012, 06:13

Well, provide your rewrite.log for the testing request.
Logging issues described in FAQ

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 33 guests