What is Mod Rewrite?
According to Wikipedia:
A rewrite engine is a piece of web server software used to modify URLs before fetching the requested item, for a variety of purposes. This technique is known as URL rewriting. A concise URL is easy to remember, and less time-consuming to type in. If the URL can be made to relate clearly to the content of the page, then errors are less likely to happen. More details about mod rewrite here.
Ok now that we have seen what Mod Rewrite actually does we will start on learning how to actually rewrite your URL.
If you have a website and your pages links form are : index.php?id_cat=10 you can optimize them to look like 10_keyword.html with a little effort and knowledges.
Create .htaccess file in root or edit if exists and add the following lines:
#Options +FollowSymLinks #RewriteEngine on #RewriteRule ^([0-9]+)-[a-zA-Z0-9-_]*.html$ index.php?id_cat=$1 [L]