My handler is on my .site / post / signup.php I make a request:

$("#regis").click(function(){ var name = $(".namereg").val(); var email = $(".emailreg").val(); var pass = $(".passreg").val(); if(name == '' || pass == '' || email == ''){ alert("Поля пустые!!!"); }else{ $.ajax({ url: "/post/signup.php", type: "POST", data:{name: name,pass: pass,email: email}, success: function(data){ $("#result").html(data); } }); } }); 

but why do I have the answer 404 why?

  • Add to the question the contents of the .htaccess file - Maxim Timakov
  • / web /: RewriteEngine On RewriteBase / RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule. index.php - mega94
  • root: Options + FollowSymLinks IndexIgnore / RewriteEngine on RewriteCond% {REQUEST_URI}! ^ / (web) RewriteRule ^ assets(..)) web / assets / $ 1 [L] RewriteRule ^ css /(.*) web / css / $ 1 [L] RewriteRule ^ js /(.*) web / js / $ 1 [L] RewriteRule ^ images /(.*) web / images / $ 1 [L] RewriteRule (. *) / Web / $ 1 RewriteCond% {REQUEST_FILENAME}! -F RewriteCond% {REQUEST_FILENAME}! -D RewriteRule. /web/index.php - mega94
  • one
    Check whether the file is available directly, without Ajax; then check where the request goes through the browser's developer tools - Artem Gorlachev
  • one
    take the file code to the component and access it via the action controller - setting .htaccess for correct work with the framework redirects all requests to the server to index.php in the root of the site - Blacknife

0