Forum Moderators: phranque

Message Too Old, No Replies

post variables passed with .htaccess

are they passed?

         

WhosAWhata

5:45 pm on Aug 3, 2004 (gmt 0)

10+ Year Member



if i have say a form that sends a variable to this.php using method="post"

then a .htaccess to redirect this.php to that.php

will that.php have the variable be passed with post still?

stevenmusumeche

7:04 pm on Aug 3, 2004 (gmt 0)

10+ Year Member



Signs point to yes.

ergophobe

8:00 pm on Aug 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Absolutely. Almost every form page I do depends on that behavior.

Tom

jdMorgan

10:41 pm on Aug 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some members report problems doing this, and it may depend on how you have php installed. There are several threads here at WebmasterWorld. Here's one I found by searching: [webmasterworld.com...]

Jim

ergophobe

10:46 pm on Aug 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Jim,

That thread is about redirecting using the php header() function. If you do that you will lose all post data unless you take additional measures (cURL, sessions, something like that).

If you have a rewrite rule in your .htaccess, though, it will work without problem unless there is something else non-standard in your install.

Tom

jdMorgan

11:51 pm on Aug 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This problem still appears to be open: [webmasterworld.com...]

Jim

ergophobe

12:49 am on Aug 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I can see the problem with external redirects that you mention in that thread.

I think this person just wants to redirect from one file to another on the same server so, rather than a redirect, a rewrite should work and pose no problem with regard to POST data, right?