title: I tried using htacess for seo friendly rewrite.it successfully redirected but href on the redirected page also had the redirected url
body: <p>This is my rewrite url. www.xxx.com/deal/f should be redirected to www.xxx.com/deal.php?shopid=1.</p>
  
  <pre><code>RewriteRule ^deal/f$ deal.php?shopid=1 [NC,L]
  </code></pre>
  
  <p>Even though it successfully redirected the other normal url on that page such as www.xxx.com/contact.php is being shown as www.xxx.com/deal/contact.php and all links are dead because of this.
  Kindly help me in this
  My htaccess code for additional information:</p>
  
  <pre><code># Use PHP5.4 as default
  
  AddHandler application/x-httpd-php .php
  
  RewriteEngine On
  
  RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?username=$1
  
  &lt;IfModule mod_deflate.c&gt;
    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
  
    # Remove browser bugs (only needed for really old browsers)
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
  &lt;/IfModule&gt;
  </code></pre>