title: How to deploy Symfony2 on a shared-hosting?
body: <p>I want to access my symfony app in production env (<a href="http://www.sample.com/amateur1/web/app.php" rel="nofollow noreferrer">http://www.sample.com/amateur1/web/app.php</a>) from this url <a href="http://www.sample.com/amateur1" rel="nofollow noreferrer">http://www.sample.com/amateur1</a>.</p>
  
  <p>To do that I moved the .htacces file to <a href="http://www.sample.com/amateur1/.htaccess" rel="nofollow noreferrer">http://www.sample.com/amateur1/.htaccess</a> with this contents:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteBase /web/
  
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ app.php [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But when I go to <a href="http://www.sample.com/amateur1" rel="nofollow noreferrer">http://www.sample.com/amateur1</a> shows a 404 Error, and <em>prod.log</em> isn't written.</p>
  
  <p>I also used <code>RewriteBase /amateur1/web/</code> because I don't know If <em>RewriteBase</em> path is relative to the <em>DocumentRoot</em> of the server, Or from the path where the <em>.htaccess</em> file is located. Also tried <code>/amateur1</code> and <code>/amateur1/</code> as RewriteBase due to this answer <a href="https://stackoverflow.com/questions/12423983/symfony2-how-to-deploy-in-subdirectory-apache">Symfony2: How to deploy in subdirectory (Apache)</a></p>
  
  <p>With the three try's, The Exceptions page appears unstyled, and not loading any image. But then I get the following error in prod.log file:</p>
  
  <pre><code>[2013-02-15 02:06:47] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /amateur1/" (uncaught exception) at /home/u105859802/public_html/amateur1/app/cache/prod/classes.php line 5121 [] []
  </code></pre>
  
  <p>What I'm doing wrong ?</p>