Why ajax post can not load page when use short url ?
When i use short URL test.php
in ajax post like this
<script>
function send_username_value_for_check_available() {
$.ajax
(
{
url: 'test.php',
type: 'POST',
data: $('#username_send_value_fid').serialize(),
cache: false,
success: function (data) {
$('#mySpan_username').show();
$('#mySpan_username').html(data);
}
}
)
}
</script>
i will get error
XMLHttpRequest cannot load https://example.com/test.php. Response for preflight is invalid (redirect)
But when i use full URL https://www.example.com/test.php
it's work good.
How can i do for use short URL in ajax post ?