I’m running a site (in a development environment) that has http://172.31.129.188:8888/pp/ as its base url.
From http://172.31.129.188:8888/pp/pingpong I have this ajax call:
$.post('pingpong/check/',
function (data) {
alert(data);
}
);
The problem is that while Firefox and Explorer call http://172.31.129.188:8888/pp/pingpong/check (as I want), Chrome makes a call to http://172.31.129.188:8888/pp/pingpong/pingpong/check. I’ve tried various combinations (like adding and removing the slashes etc) but still Chrome seems to have a different approach.
Can anyone help to unify the behavior? Thanks
In my opinion, Chrome is behaving correctly and IE/Firefox are not. URLs are either absolute with a domain, relative to the domain-base if they start with a slash (/) or relative to the current location.
If you access
b/cfrom/a/bthat should be/a/b/b/cnot/a/b/cas thebis relative to the current location, it should not match part of the location and continue from there. If you need to use relative URLs try callingcheck/to see if that behaves appropriately.