title: Remove index.php from URL of Laravel
body: <p>I am using Laravel 5.5.12 in Linux Mint.I am using LAMP stack. I would like to remove <code>index.php</code> from URL. My <code>mod_rewrite</code> apache module enabled.</p>
  
  <p>My <code>.htaccess</code> file located in <code>public</code> folder and it contains following code.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      Options +FollowSymLinks
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} (.+)/$
      RewriteRule ^ %1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  
      # Handle Authorization Header
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I renamed the server.php in the Laravel root folder to index.php and copy the .htaccess file from /public directory to Laravel root folder. But it is not working.  </p>
  
  <p>I placed below code in <code>.htaccess</code> file </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  
    # Turn Off mod_dir Redirect For Existing Directories
    DirectorySlash Off
  
    # Rewrite For Public Folder
    RewriteEngine on
    RewriteRule ^(.*)$ public/$1 [L]
  
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But this not working.</p>
  
  <p>Could anyone help me in this regard ?</p>