There is a static page site where I try to add micro-cms using lines in .htaccess:

Options -Indexes ErrorDocument 403 /403.php ErrorDocument 404 /403.php ErrorDocument 500 /403.php 

those. all requests for non-existent pages will be redirected to the 403.php engine. Everything was fine, until I took the forms - it turns out, if you transfer data not to a specific script, but to the current page, for example:

 <form action='". $_SERVER['REQUEST_URI'] ."' method=post> 

then the engine does not receive data, it needs:

 <form action='/403.php' method=post> 

Is it possible to configure .htaccess so that the engine always receives $_POST ?

  • Most likely not. [Here] [1] is the same question. [1]: habrahabr.ru/qa/9872 - ReinRaus
  • Thank. I'm going to drink from grief. - DixDix
  • In general, it is more correct to leave action = "" or action = ".", Then the current script will be the form handler. Who taught you that at all? - Shamanis

1 answer 1

made from comments.


In general, it is more correct to leave action="" or action="." , then the current script will be the form handler.