title: seo url would not open after shifting files to root dir from sub
body: <p>my current seo url was on sub dir which worked ok but after trying to use the script on root dir the link wont open</p>
  
  <p>this is the articles.php codes</p>
  
  <pre><code>$url = $_SERVER['REQUEST_URI'];
  $url = str_replace('/', '', $url);
  
  $stmt = $db-&gt;prepare("SELECT * FROM articles WHERE seo_url = :seo_url");
  $stmt-&gt;bindParam(':seo_url', $url, PDO::PARAM_STR);
  $stmt-&gt;execute();
  $row = $stmt-&gt;fetch();
  $cou = $stmt-&gt;rowCount();
  
  if($cou &lt;1){
          header("Location: error.php");
          exit();
  }
  </code></pre>
  
  <p>and my htaccess is</p>
  
  <pre><code>RewriteEngine On
  
  # SEO URL Settings
  
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteRule ^(.*)\?*$ articles.php?$1 [L,QSA] 
  </code></pre>
  
  <p>the code above redirects me to error.php page</p>
  
  <p>earlier on sub folder it was something like this </p>
  
  <pre><code>$url = $_SERVER['REQUEST_URI'];
      $url = str_replace('/test/', '', $url);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>RewriteBase /test/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
  
      RewriteRule ^(.*)\?*$ articles.php?$1 [L,QSA] 
  </code></pre>