title: API routes using Https on laravel gives 404
body: <p>I created an <a href="https://www.traapp.tk" rel="nofollow noreferrer">Laravel API</a>. </p>
  
  <p>First, it was using HTTP, I needed to change it to use https. </p>
  
  <p>So I created an account on Cloudflare and since then when I go to my API endpoints:</p>
  
  <p>GET: <a href="https://www.traapp.tk/api/data/20190809" rel="nofollow noreferrer">https://www.traapp.tk/api/data/20190809</a> it gives a 404:</p>
  
  <blockquote>
    <p>Not Found</p>
    
    <p>The requested URL /api/data/20190809 was not found on this server.</p>
    
    <p>Additionally, a 404 Not Found error was encountered while trying to
    use an ErrorDocument to handle the request.</p>
  </blockquote>
  
  <p>I also have a POST request and that returns a 404 to.</p>
  
  <p><code>.htacces</code></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]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  
  </code></pre>
  
  <p><code>api.php</code></p>
  
  <pre><code>Route::middleware('auth:api')-&gt;get('/user', function (Request $request) {
      return $request-&gt;user();
  });
  
  
  Route::get('data/{date}', 'MainController@index');
  
  Route::post('route', 'MainController@getAllRoutesOfACertainDay');
  </code></pre>
  
  <p><code>MainController</code> </p>
  
  <pre><code>public function index ($date) {
          $responseServer = json_decode($this-&gt;makeRequest(str_replace('DATE', $date, env('BASE_URL') . env('SCHEDULES'))),true);
          return $this-&gt;respond($responseServer);
      }
  </code></pre>
  
  <p>I tried solutions like these:</p>
  
  <p><a href="https://stackoverflow.com/questions/50134427/force-laravel-to-use-https-version">Force Laravel to use HTTPS version</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44113859/how-to-implement-https-in-laravel-5-4">How to implement HTTPS in laravel 5.4</a></p>