Reputation: 7489
This strikes me as somewhat similar to this question
I've got an AJAX request on my page, and the page location is /a/b/c. I want to send the request to d. Sending it to /d or to a/b/d I can do. However, I need to route it to a/b/c/d. How do I do that?
Upvotes: 0
Views: 254
Reputation: 6623
Use the current page url and append /d
to it.
eg.
var urlToUse = location.href + "/d";
Upvotes: 1