Posted by Eduardo on 10/11/06 14:57
Hi people
I'm working with ajax in PHP 5 posting JSON thru raw_post_data.
The data get with file_get_contents function.
That's all works until config the .haccess file.
I make that to all articles names load Artigo.php. Example:
Artigos/Meu_primeiro_artigo
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule Artigos/.* Artigo.php [L]
But thet Google Web Toolkit loads files as relative,
then I add that rule before to redirect files from root.
Example:
/Artigos/40A05E9B46169250E9F876F954A53EE1.cache.html ->
/40A05E9B46169250E9F876F954A53EE1.cache.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*\.[a-z]{2,4}$ /%{PATH_INFO} [L]
And all info raw_post_data desapear!!
Somebody have an idea? I'm doing something wrong?
Thanks a lot
//PHP code
$data = file_get_contents('php://input'); // that values desapear
$json = new Services_JSON();
$json_ = $json->decode( $data );
//.htaccss code
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*\.[a-z]{2,4}$ /%{PATH_INFO} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule Artigos/.* Artigo.php [L]
[Back to original message]
|