title: Symfony2 Ajax app_dev.php in url
body: <p>Just starting out in Symfony2 and really loving it after being a long time ZF1 developer.</p>
  
  <p>Started to add some Ajax functionality to a site tonight and am a bit confused about the following.</p>
  
  <p>in my ajax call eg:</p>
  
  <pre><code>$.ajax({
      url: '/app_dev.php/ajax/urlgetter',
      data: "url="+urlinput,
      dataType: 'html',
      timeout: 5000,
      success: function(data, status){
           // DO Stuff here
      }
  });
  </code></pre>
  
  <p>I had to add /app_dev.php to the url to make it work in dev environment. Is there not a better way of doing this? Does this mean when I change the project to a production environment I need to search and replace all instances of /app_dev.php?? Hopefully I have totally missed something simple.</p>