You should use Url.Action or Url.RouteUrl to generate the URL for the AJAX call, so if your routes change then your JS need not, e.g:
.get('@Url.Action('Controller', 'Action1')',function(data)
or
.get('@Url.RouteUrl('SomeNamedRoute')',function(data)
If your putting this script in an external file then you'll need to use a technique to set the url in the main view, then read from the external variable.
Such techniques include a JavaScript variable, hidden field, passing URL to function as parameter, etc.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.