title: Laravel 8.4 – Remove Public from URL
body: <p>I am working on creating a website that converts text into speech. I am using the script from codecanyon which is Developed with PHP 7.4.x and Laravel 8.4.x . The issue I am facing is that I don't want to show <strong>/public</strong> URL as a permalink to access the website. Now, if I type mywebsite.com/pubic then the website is accessible otherwise if I write mywebsite.com then it only shows the files. I followed some of the previous queries posted on StackOverflow but got no results.
  The topic I followed is <a href="https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url">Laravel 5 – Remove Public from URL</a>
  I tried even by renaming server.php , copying .htaccess and rewriting it. But those all resulted in a screen showing up errors or even blank.</p>
  <p>My .htaccess file is;</p>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  &lt;IfModule mod_negotiation.c&gt;
      Options -MultiViews -Indexes
  &lt;/IfModule&gt;
  
  RewriteEngine On
  
  # Handle Authorization Header
  RewriteCond %{HTTP:Authorization} .
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
  # Redirect Trailing Slashes If Not A Folder...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} (.+)/$
  RewriteRule ^ %1 [L,R=301]
  
  # Send Requests To Front Controller...
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
  </code></pre>