title: htaccess redirect subdirectory (folder) to single page in same subdirectory
body: <p>I am having another issue with .htaccess where I can't seem to find the right solution for it. What I am trying to accomplish is to redirect from a subdirectory to a specific html document within that <strong>same directory</strong> when you <strong>copy/paste</strong> the url displayed below</p>
  
  <p>For example:
  <a href="http://example.com/staging/" rel="nofollow noreferrer">http://example.com/staging/</a><strong>test/</strong> to <a href="http://example.com/staging/" rel="nofollow noreferrer">http://example.com/staging/</a><strong>test/page.html</strong></p>
  
  <p>My (almost) working method:</p>
  
  <pre><code>Options -Indexes -MultiViews
  RewriteEngine on
  
  RewriteRule ^test/(.*)$ test/page.html [L]
  </code></pre>
  
  <p>The problem with this code is that it does basically redirect to the correct <strong>page.html</strong> but if you want to click on any link on page.html it just redirects to page.html again instead of going to a particular link within subdirectory /test/ let's say <strong>/test/page-2.html</strong></p>
  
  <p><strong>Important:</strong> This redirect should only affect the subdirectory "staging". All other sub-directories including root can not be affected.</p>
  
  <p><strong>Other info:</strong>
  This code is also in my .htaccess file to remove the .html extension for the directory "staging"</p>
  
  <pre><code>RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteRule ^(.*)$ $1.html [L]
  </code></pre>
  
  <p>The directory "staging" is not connected to any CMS and only consists of .html files.
  I am on a shared hosting environment (Hostgator/cPanel).</p>
  
  <p>Thank you.</p>