title: Error: The requested URL /login was not found on this server. (Laravel)
body: <pre><code>PHP 7.4.9
  Laravel 7.20.0
  Appache 2.4.6
  RedHat 7
  </code></pre>
  <p>I deployed my laravel project on the server and I am receiving the below error:</p>
  <pre><code>Not Found
  The requested URL /login was not found on this server.
  </code></pre>
  <p>I tried almost all solutions that i found online.
  The problem stayed the same.
  mod_rewrite is enabled.
  I added multiple line to httpd.conf and fix DocumentRoot</p>
  <p>/etc/httpd/conf/httpd.conf</p>
  <pre><code>DocumentRoot &quot;/var/www/html/chatbot/public&quot;
  
  &lt;Directory &quot;/var/www/html/chatbot/public&quot;&gt;
          AllowOverride All
  &lt;/Directory&gt;
  </code></pre>
  <p>/var/www/html/chatbot/public/htaccess</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]
  &lt;/IfModule&gt;
  </code></pre>
  <p>Please note that when i try to link the DocumentRoot to a new laravel project, it works fine, but for the deployed code its not working(receiving the above error).</p>
  <p><a href="https://i.stack.imgur.com/OsTUL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OsTUL.png" alt="enter image description here" /></a></p>
  <p>Public folder:</p>
  <p><a href="https://i.stack.imgur.com/NiXtx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NiXtx.png" alt="enter image description here" /></a></p>