title: How to remove part of a url using htaccess
body: <p>I have looked at a good few similar questions on stack overflow but what I have tried doesn't seem to work.</p>
  <p>'quotes' is a subfolder with a wordpress installation in it. So, the main root has a wordpress site in it and the 'quotes' subfolder also has a wordpress installation in it.</p>
  <p>I have a path something like</p>
  <pre><code>https://example.com/quotes/uk/travel-packages
  https://example.com/quotes/us/travel-packages
  </code></pre>
  <p>But I don't want 'quotes' to be in the url, it should just be</p>
  <pre><code>https://example.com/uk/travel-packages
  </code></pre>
  <p>I currently have this</p>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /example/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /example/index.php [L]
  
      
  RewriteRule ^quotes/(.*)$ /$1 [L,NC,R]
  
  RewriteRule ^uk/(.*) /quotes/$1 [L]
  RewriteRule ^us/(.*) /quotes/$1 [L]
  
  &lt;/IfModule&gt;
  </code></pre>
  <p><strong>EDIT:</strong> I was trying this on my localhost hence the rewrite base being /example/ so I understand the confusion there now.</p>
  <p>Here is the live server .htaccess file for both the root directory and the quotes subfolder in the root directory.</p>
  <p><strong>ROOT:</strong></p>
  <pre><code># BEGIN WordPress
  # The directives (lines) between &quot;BEGIN WordPress&quot; and &quot;END WordPress&quot; are
  # dynamically generated, and should only be modified via WordPress filters.
  # Any changes to the directives between these markers will be overwritten.
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  <p><strong>QUOTES SUBDIRECTORY</strong></p>
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /quotes/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /quotes/index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>