Following javascript code:
<script type="text/javascript" charset="utf-8">
function goForLogin() {
var xmlhttp;
xmlhttp=new XMLHttpRequest();
xmlhttp.open("POST","/account/login",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("email=test%40test.com&password=1");
}
</script>
I run this code in module test/index – I have to!
When I log the request with tampadata, the url is http://dev.server.com/test/account/login. How can I get rid of test in the url? Two times a different module. This is not correct!
When I do in xmlhttp.open… “dev.server.com/account/login/” The output will be: http://dev.server.com/test/dev.server.com/account/login/.
Try to specify a full url as your POST request target: