PHP and Mod Rewrite problem

Discussion in 'PHP' started by dramiditis, Jul 17, 2009.

  1. #1
    Hi, I'm using links with php variables :

    <a href="site.php?p=2&site=<? echo($site); ?>">name</a>

    So I have made htaccess file with mod rewrite:

    RewriteEngine On
    RewriteRule ^([^/]*)\.html$ /site.php?p=$1&site=$2 [L]


    If I type in browser rewrited URL than it's work, but when I click on link from my script than it links me to NOT rewrited Url.

    How can I change link code in my PHP script to corespondent to rewrite Url.

    Thanks
     
    dramiditis, Jul 17, 2009 IP