title: How to deploy a Laravel app to a sub-directory
body: <p>I'm new to Laravel framework so this question might be a little stupid but here's the problem:</p>
  <p>I have a small project on my local machine and now I need to deploy my project to a live environment ( shared hosting ).</p>
  <p>The problem is, my project needs to be stored in a sub-directory ( sub-folder ) of the main domain ( eg. my domain will be <strong>main.com</strong>, and the project will be at <strong>main.com/my-project</strong> ).
  I've created a sub folder inside the public_html of the main domain, then I uploaded my project to that sub-directory. At first, when I went to the url <strong>main.com/my-project</strong>, I see a directory tree ( like localhost ), then I needed to click to public folder to go to my app. So I looked for the solutions on the internet and I tried the .htaccess way, here's my .htaccess file:</p>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/project/public/
      RewriteRule ^(.*)$ /project/public/$1 [L,QSA]
  &lt;/IfModule&gt;
  </code></pre>
  <p>But when I reload the url <strong>main.com/my-project</strong>, I kept receiving the message URL request not found.</p>
  <p>I've been struggling with this issue for a while and still haven't figured it out. Any idea how I can solve this problem? Please help me out, thanks.</p>