Last Modified: 12.09.2014
If the option ErrorDocument (ErrorDocument 404 /404.php) is used on the website to process non-existent pages, then upon sending a HTTP POST query to a non-existent page the data of the POST query will be lost. That is why such queries must be sent to the scripts that exist physically.
One of the ways to organize SEF in components 2.0 consists in using the ErrorDocument option. There is a standard solution for components 2.0 which permits not to worry about the option used for SEF support, be it ErrorDocument or mod_rewrite.
When writing forms in component templates which send data using the POST method the constant POST_FORM_ACTION_URI must be indicated as action:
<form method="post" action="<?=POST_FORM_ACTION_URI?>">
* * *
In this case, when working with the ErrorDocument option, a POST query will be sent to a script that exists physically, and in other cases – to a current address. It will make no difference for a component as to whether it was called by a POST or a GET query. All the required variables will be set up accordingly.