POST data is missing
4 posts
• Page 1 of 1
POST data is missing
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?
RewriteCond %{REQUEST_METHOD} !^POST$ [NC]
Any suggestions?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: POST data is missing
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
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
Re: POST data is missing
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?
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?
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests