title: Re-write codes not working in HTACCESS file;
body: <p>before this thread is marked as a "<strong>duplicate</strong>", or down-voted by someone eager.......kindly allow me to address my issue first  :)</p>
  
  <p>Despite having dozens of various solutions to this issue online, none seem to work for me.  </p>
  
  <p>I'm trying to hide a folder, so it does not display in my URL.</p>
  
  <p>My domain name is : <strong>www.example.com</strong></p>
  
  <p>My login file is within the "<strong>PHP</strong>" folder.</p>
  
  <p>So, the login URL is :  <strong>www.example.com/PHP/login.php</strong></p>
  
  <p>I am trying to hide the "<strong>PHP</strong>", so the URL displays as :</p>
  
  <p><strong>www.example.com/login.php</strong></p>
  
  <p>I've copy-pasted several examples from this forum, but nothing seems to work.</p>
  
  <p>I've tried this :</p>
  
  <pre><code>  RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/PHP/
    RewriteRule ^(.*)$ /PHP/$1 
  </code></pre>
  
  <p>or this.........</p>
  
  <pre><code> RewriteEngine On
   RewriteCond %{REQUEST_URI} !^/PHP
   RewriteRule ^(.*)$ PHP/ $1 
  </code></pre>
  
  <p>(i.e., I removed the trailing slashes)</p>
  
  <p>Nothing works.  The URL continues to load normally.</p>
  
  <p>The only time I get an error is when I include the "<strong>[L]</strong>" at the end of the code :</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/PHP/
  RewriteRule ^(.*)$ /PHP/ $1 [L]
  </code></pre>
  
  <p>Then, I get a "<strong>403</strong>" error..........which makes sense, seeing as the "[L]"  prevents any further Re-write commands from executing. And I have a few of them in my HTACCESS file.</p>
  
  <p>Here is my complete HTACCESS file :</p>
  
  <pre><code> RewriteEngine on
   RewriteBase /
  
   RewriteCond %{HTTP_HOST} ^(www.)?example.com$
   RewriteRule ^/PHP/(.*)$ http://www.example.com/$1 [L,R=301]
  
   #RewriteCond %{REQUEST_URI} !^PHP/
   #RewriteRule ^(.*)$ PHP/$1 [L]
  
   RewriteCond %{REQUEST_FILENAME} !-d 
   RewriteCond %{REQUEST_FILENAME}\.php -f 
   RewriteRule ^(.*)$ $1.php
  
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]
  </code></pre>
  
  <p>(Note the two lines which are <strong>commented-out</strong>. )</p>