If your site handles error pages using the ErrorDocument
option (ErrorDocument 404 /404.php
), sending an HTTP POST
request to an error page will lose request parameters. Therefore, such requests
have to be processed using scripts that exist physically.
One of the methods to handle SEF URL's using Components 2.0 allows using the ErrorDocument option. Components 2.0 offer a unified solution that will eliminate the need to care about how SEF is done: via ErrorDocument or mod_rewrite.
When creating forms in component templates that send data using POST, set the action attribute to POST_FORM_ACTION_URI:
<form method="post" action="<?=POST_FORM_ACTION_URI?>"> * * * </form>
In this case, a POST request will be sent to an existing script when using ErrorDocument, or to the current address in other cases. The most convenient thing is that no matter how a component is called: via POST or GET request. All the required variables will be set properly.
© 2001-2007 Bitrix | Bitrix Site Manager |