an example of setting up symfony2 so that requests work with both ajax and normal browser http requests