title: jquery post and get request different on local intranet and live server
body: <p>I have been developing an asp.net mvc application where i need to make large amounts of jquery post and get request to call controller methods and get back json result. Everything is working fine.</p>
  
  <p>The problem is  i had to write different jquery post and get request url on local intranet(deployed by making virtual directory) and live server.</p>
  
  <p>the current jquery request url is given as below:</p>
  
  <p><strong>$.post("/ProjectsChat/GetMessages", { roomId: 24 },..........</strong></p>
  
  <p>now this format of url for jquery request works fine for live server but not for local intranet. Since on local intranet i have made a virtual directory. <strong>It only works when i append the name of the virtual directory like this "$.post("MyProjectVirutalDirName/ProjectsChat..................."</strong></p>
  
  <p>I am sure most of you must have come across same problem.</p>
  
  <p>now i have made a full project, there are large number of jquery requests made, i want to test the application by deploying on local intranet and fix the bugs. Changing all the jquery requests for local intranet doesn't seem feasible solution to me, i am really in a big problem, i can't deploy the same project on live server just like that and test it there, client will kill me.</p>
  
  <p>I need some expert advice.</p>
  
  <p>Please help</p>
  
  <p>Thanks</p>