Firstly I'm still beginner in mod_rewrite.
Everybody if I have this .htaccess code
RewriteEngine On
RewriteRule ^index/(.*)/$ index.php?usr=$1 [L]
Is must change the form of the link(href) to
Example
<a href="index/image/">Click Here</a>
Or leaving it as is
Example
<a href="index.php?usr=5">Click Here</a>
If leave it as is <a href="index.php?usr=5">Click Here</a>
Will show the link this way http://domain.com/index/image/
.
EDIT #1
Here's a sample of the html code.
<div id="main_menu">
<ul>
<li><a href="index.php">{$lang.Nav_Home}</a></li>
<li><a href="sections.php?cid={$value.cat_id}">{$value.cat_name}</a></li> {else}
<li id="moreSection_{$secNum}" style="display: none;"><a href="sections.php?cid={$value.cat_id}">{$value.cat_name}</a></li>
<li><a href="javascript:;" onclick="showHideMoreSec('moreSection',this)"> <img src="images/arrow_down.png" alt="{$lang.MainMenu_MoreSection}" title="{$lang.MainMenu_MoreSection}" /> </a></li>
</ul>
</div>
<a href="index/image/">Click Here</a>
or leave it as<a href="index.php?usr=5">Click Here</a>
?http://domain.com/index/image/
and this is very difficult. the problem is how can I change all hyperlinks that in the script at once to new friendly url ?<a href="sections.php?cid={$value.cat_id}">{$value.cat_name}</a>
Specificallysections.php?cid={$value.cat_id}
, because when click on this link will show as old style url, and I would like to show as friendly url.