HTTP_RAW_POST_DATA with ErrorDocuments

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
duphus
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2004 7:51 pm

HTTP_RAW_POST_DATA with ErrorDocuments

Post by duphus »

I am using an error handler like this (htaccess):

Code: Select all

ErrorDocument 404 /index.php
To use dynamic/fake URLs, the problem is, the error document does not get the post data ($_POST)... $_SERVER["HTTP_RAW_POST_DATA"] is the main thing I want, which is empty too.

Any info on this? :)
User avatar
Michael 01
Forum Commoner
Posts: 87
Joined: Wed Feb 04, 2004 12:26 am

Post by Michael 01 »

Just curious, but why would you want a fake URL....especially for your index.php page?

Most of the time you can set this through your admin panel of your server, as with .htaccess files..etc..
duphus
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2004 7:51 pm

Post by duphus »

index.php is the index and the routing file as well.
for example:

http://127.0.0.1/users/214

index.php would detect there are some params there and include users.php and users.php would see the 2nd param is a number and show the profile for that user.

or

http://127.0.0.1/article/214

same goes...
duphus
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2004 7:51 pm

Post by duphus »

I dont think ErrorDocument is the way to go..
Ive been looking at mod_rewrite... but I cant figure out a rule that will make 404s goto index.php

Any help with that then?
Post Reply