title: How do I hide a /public/ directory in htacess
body: <p>My website is website.com/public/login.php. That looks a bit ugly. How do you rewrite htaccess to say website.com/login.php?</p>
  
  <p>I've tried </p>
  
  <pre><code>RewriteEngine On
  RewriteBase /public/
  
  RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
  RewriteRule ^ %1 [L,NE,R=302]
  
  RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
  </code></pre>