title: .htaccess RewriteCond to use cached pages if they exist is not working
body: <p>I have a laravel application installed on a shared hosting package and I'm using <a href="https://github.com/JosephSilber/page-cache" rel="nofollow noreferrer">https://github.com/JosephSilber/page-cache</a> to cache pages.</p>
  <p>The cached pages are stored in the following server folder <code>/home/username/public_html/app_name/public/page-cache/article</code></p>
  <p>The following code is in the .htaccess found in public folder</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]
  
      # Serve Cached Page If Available...
      RewriteCond %{REQUEST_URI} ^/?$
      RewriteCond %{DOCUMENT_ROOT}/public/page-cache/pc__index__pc.html -f
      RewriteRule .? public/page-cache/pc__index__pc.html [L]
      RewriteCond %{DOCUMENT_ROOT}/public/page-cache%{REQUEST_URI}.html -f
      RewriteRule . public/page-cache%{REQUEST_URI}.html [L]
      RewriteCond %{DOCUMENT_ROOT}/public/page-cache%{REQUEST_URI}.json -f
      RewriteRule . public/page-cache%{REQUEST_URI}.json [L]
      
      
  
      # Send Requests To Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
      
      
      
  &lt;/IfModule&gt;
  </code></pre>
  <p>I have tried to debug the values of DOCUMENT_ROOT AND REQUEST_URI and I'm getting the following:
  <code>%{DOCUMENT_ROOT} = /home/username/public_html/app_name and %{REQUEST_URI} = /article/race-policing-and-the-universal-yearning-for-safety</code></p>
  <p>With the above code in .htaccess i'm not managing to direct it to the cache pages but its going directly to the application even though the file exists.</p>
  <p>e.g. <code>/home/username/public_html/app_name/public/page-cache/article/race-policing-and-the-universal-yearning-for-safety.html</code></p>
  <p>There is also the following .htaccess file in the app_name folder.</p>
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  
     RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
      RewriteRule ^(.*)$ public/$1
  
  #disable directory browsing
  Options -Indexes
  
  #PROTECT ENV FILE
  &lt;Files .env&gt;
  order allow,deny
  Deny from all
  &lt;/Files&gt;
  
  #PROTECT ENV FILE
  &lt;Files .htaccess&gt;
  order allow,deny
  Deny from all
  &lt;/Files&gt;
  </code></pre>
  <p>I would appreciate if someone can help me identify the reason why the .htaccess is not loading the cache page when it exists. Stay safe guys :).</p>