title: htacces remove folder from custom url
body: <p>I have the following code on my .htaccess</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^cp/artes-escenicas/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/ciencia-y-tecnologia/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/arte-y-diseno/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/deportes/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/idiomas/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/academico/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/rutas/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  RewriteRule ^cp/voluntariado/([^/]+)/?$ cp/course-details.php?name=$1 [NC,L]
  </code></pre>
  
  <p>this allow me to have the following URL's:</p>
  
  <pre><code>http://pepperscope.com/cp/index.php
  http://pepperscope.com/cp/artes-escenicas
  http://pepperscope.com/cp/ciencia-y-tecnologia
  http://pepperscope.com/cp/arte-y-diseno
  http://pepperscope.com/cp/arte-y-diseno
  http://pepperscope.com/cp/deportes
  http://pepperscope.com/cp/campamentos
  http://pepperscope.com/cp/idiomas
  http://pepperscope.com/cp/academico
  http://pepperscope.com/cp/rutas
  http://pepperscope.com/cp/voluntariado
  http://pepperscope.com/cp/lifestyle
  </code></pre>
  
  <p>But I need two things:</p>
  
  <p>1) have the root on pepperscope.com instead of pepperscope.com/cp/index.php</p>
  
  <p>2) remove the cp folder from all my links, like that:</p>
  
  <pre><code>http://pepperscope.com/artes-escenicas
  http://pepperscope.com/ciencia-y-tecnologia
  http://pepperscope.com/arte-y-diseno
  http://pepperscope.com/arte-y-diseno
  http://pepperscope.com/deportes
  http://pepperscope.com/campamentos
  http://pepperscope.com/idiomas
  http://pepperscope.com/academico
  http://pepperscope.com/rutas
  http://pepperscope.com/voluntariado
  http://pepperscope.com/lifestyle
  </code></pre>
  
  <p>Thanks in advance for your help. </p>