title: htaccess query string rewrite in localhost
body: <p>I have an issue with the rewriting of the query string.</p>
  
  <p>The URL I have is the following:</p>
  
  <p>localhost/www/whours.com/index.php?comp=login_controller/noAuth</p>
  
  <p>and I would like to translate it in:</p>
  
  <p>localhost/www/whours.com/login_controller/noAuth</p>
  
  <p>In my htaccess, currently, there is the following code:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{QUERY_STRING} ^comp=(.*)$
  RewriteRule ^(.*)$  www/whours.com/%1?
  </code></pre>
  
  <p>and in the index.php:</p>
  
  <pre><code>// Getting the absolute root path
  define('ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR);
  
  include_once("App/Core/Config/config.php");
  include_once(CORE_PATH . DIRECTORY_SEPARATOR . "Include/autoloader.php");
  
  //echo ('location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?comp=login_controller/noAuth");
  if (!isset($_GET['comp']))
  {
      header('location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?comp=login_controller/noAuth");
  }
  $app = new Application();
  $app-&gt;run();
  </code></pre>
  
  <p>When I am contacting the URL in localhost it seems the htaccess is not applied and the result is page Error 404 with the following URL: localhost/www/whours.com/index.php?comp=login_controller/noAuth</p>
  
  <p>Could you please give me a suggestion or an help to find where is placed the issue?</p>
  
  <p>Many thanks in advance.
  Simone</p>