Im trying to rewrite my urls and I have the following in my htaccess where the pageid is the mysql id for each page and title is the page title. 

```
RewriteRule ^([^/]*)/([^/]*)\.html$ content.php?pageid=$1&title=$2 [L]

```

**Current URL structure based on this rule is:**
<http://domian.com/3/Contact.html>

**And would like to change it to:**
<http://domian.com/Contact.html>

Also I have this php function that changes the URL:

```
  function createPageLink($id)
  {
      global $db, $core;

      $sql = "SELECT id, slug FROM pages WHERE id = '".(int)$id."'";
      $row = $db->first($sql);

      $slug = $row['slug'];

      if ($core->seo == 1) {
          $display = $core->site_url . '/' . intval($id) . '/' . sanitize($slug) . '.html';
      } else {
          $display = $core->site_url . '/content.php?pageid=' . intval($id);
      }
      return $display;
  }

```

So basically remove the number after the URL and just have the title only. 

I know its pretty simple but it driving me nuts. Thanks