Forum Moderators: coopster

Message Too Old, No Replies

Sending on POST via 404 page and include()

How to do it?

         

vincevincevince

6:19 pm on Jul 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let me explain:

www.example.com/account/page.php

This does not exist physically, and the 404 custom php page parses out the /account/ part, and sets it as a session variable.

The script then outputs 200 OK headers and then does:

include("full/server/path/to/page.php")
(or whatever the original filename was)

Unfortunately... I can't access any POST data from page.php now.

How can I send on all POST data universally via the 404 so it can be accessed using the normal method?

jatar_k

8:18 pm on Jul 17, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Interest question, why don't you use mod_rewrite or some such other method as opposed to using your 404 to serve dynamic pages? or is there some purpose that I am not understanding?

vincevincevince

8:48 pm on Jul 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



that is a good idea jatar_k, i will try that :-)