Re: Repost: mod_rewirte loses POST data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Evert from collan thouht it wy have to do with the rewrite rules or the 
script and asked to post both of them

this are the rewrite rules i use:

     RewriteEngine On
     RewriteRule ^/(.*[^/])/Admin/(.*)$ https://my.domain.com/$1/Admin/$2 
[R,L,NS]
     RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d [OR]
     RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
     RewriteRule ^(.*)$ - [L,NS]
     RewriteCond %{QUERY_STRING} !^$
     RewriteRule ^/(.*)/(.*)/$ 
/index.php?shopid=$1&page=$2&%{QUERY_STRING} [L,NS]
     RewriteRule ^/(.*)/(.*)/$          /index.php?shopid=$1&page=$2 
[L,NS]
     RewriteCond %{QUERY_STRING} !^$
     RewriteRule ^/(.*)/$               /index.php?shopid=$1&%{QUERY_STRING} 
[L,NS]
     RewriteRule ^/(.*)/$               /index.php?shopid=$1 
[L,NS]

He also suggested it might be the fault of the php scripting: this is what i 
do:

  if (isset($_GET["page"]))
    switch (strtolower($_GET["page"]))
    {
// snip //
      break;
     case "basket":
      echo "<pre>\n";
      var_dump(get_defined_vars ());
      echo "</pre>\n";
      include("includes/basket.inc.php");

in IE i get this output for post and get:

array(18) {
  ["HTTP_POST_VARS"]=>
  array(0) {
  }
  ["_POST"]=>
  array(0) {
  }
  ["HTTP_GET_VARS"]=>
  array(2) {
    ["shopid"]=>
    string(3) "wsn"
    ["page"]=>
    string(6) "Basket"
  }
  ["_GET"]=>
  array(2) {
    ["shopid"]=>
    string(3) "wsn"
    ["page"]=>
    string(6) "Basket"
  }
// snip //

Am i doing something wrong?

"Bart Seresia" <bart@xxxxxx> schreef in bericht 
news:20050514131430.9841.qmail@xxxxxxxxxxxxxxxx
> Hi,
>
> I'm currently developing a webapplication that uses mod_rewrite.
>
> At some point i have to post data but i't seems to get lost, checking the 
> web and some archives i've found that normaly mod_rewrite should preserver 
> this data, but apparently it doesn't. Could anyone help me?
>
> Im using:
> Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7b PHP/4.3.11 Server at 
> host.mydomain.com Port 80 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux