title: how to make href while using htaccess rewrite for dynamic url
body: <p>I want to use .htaccess file to make friendly URLs. But when I click on the link which is specified in href</p>
  
  <pre><code>&lt;a href="category.php?id= &lt;?php echo "{$row['name']}"; ?&gt;"&gt;Example &lt;/a&gt;
  </code></pre>
  
  <p><code>$row['name']</code> is dynamic. data is present in MySQL database.</p>
  
  <p>Code (category.php):</p>
  
  <pre><code>&lt;?php
  if($_GET['id']){
    $result = $_GET['id'];
  }
  echo "this is {$result} page";
  ?&gt;
  </code></pre>
  
  <p>This just store the passed parameter in <code>$result</code> variable and displays it on screen.</p>
  
  <p>Code (.HTACCESS file):</p>
  
  <pre><code>Options -Multiviews
  RewriteEngine On
  RewriteRule   ^website/(.+)$   category.php?id=$1
  </code></pre>
  
  <p>when I click on the link it shows the URL like <code>http://mydomain.com/category.php?id=Rohit</code>
  instead of <code>http://mydomain.com/website/rohit</code>.</p>
  
  <p>However when I write URL manually to <code>http://mydomain.com/website/rohit</code> it shows the same page. Which indicates that .htaccess file is working. I want to show the above URL directly when I click word Example.</p>
  
  <p>One example<br>
  When we click on page barack obama in Wikipedia it goes to <code>http://en.wikipedia.org/wiki/Barack_obama</code> but the original link works too -<code>http://en.wikipedia.org/w/index.php?title=Barack_obama</code>. Both pages show the same data.
  They don't show the second URL to the user but the other one. I want to achieve same kind of result.</p>
  
  <p>How to write the link such that it will goes to rewrite URL?</p>