Hello dear readers.
In this tutorial i will explain in deepth how to make your url's beautiful and better for seo.
Benefits of mod_rewrite:1) they are beautiful
Lets take an example:
Non rewrited url:
Cool isnt it ?
mod_rewrite is build in security
You can use some kind of filters who allow only 0-9 or a-z etc.. by not allowing dangerous charachters
Lets move onTo make mod_rewrite work we must go to apache http.conf and add this line:
LoadModule rewrite_module modules/mod_rewrite.so Then restart apache.
Now at root open or create .htaccess if you havent it
Lets for example rewrite the profile.php url:
RewriteRule ^profile/([a-zA-Z0-9-!./]+).html$ profile.php?id=$1
Thats it, you can now integrate this rule with php scripts and here it is a tutorial