If my address is “http://localhost:8000/index”, and I run this jquery:
$.getJSON("1",function(data)
{
.....code
});
I get “http://localhost:8000/index/1”. That’s great. But if I do if I wanted it to be :
“http://localhost:8000/1”
What do I do?
Make the url root-relative:
Specifically, note the
/at the start of the url. That is what will point it to the root of the current site, in this case:http://localhost:8000/