php - message 302 with ajax but page exist -


i trying execute ajax post call in order login automatically page cors method (server setup) . when call through normal post (not ajax) works perfect. when call through ajax receive message

302 moved temporarily

i paste ajax code here (with example data)

$.ajax({             type: "post",             url: 'http://example.com/index.php?controller=authentication',             crossdomain: true,             data:'email=test@gmail.com&passwd=123456&back=my-account&submitlogin=true',             datatype: 'json',              success: function(result){      if(result == 'ok'){      console.log("ok");       }              }          });  


Comments