Url Writing means changing the appearance of URL without affecting a behavior of our site.
Lets take an example to know why we rewrite a url. Suppose we have 2 url
2.) http://www.example.com/blog/student/how -to-prepair-for-exam
We can see that url 2 is more readable and easily understandable that what it contains. It shows that it has blog for student related to their preparation of exam. And it also help Search Engine Optimizer to improve page Rank. So Url 2 is a SEF url.
Now question is that how to rewrite url and use SEF url in joomla.
We have to follow some steps to implement Mod rewriting and SEF in joomla.
1. Rename htaccess.txt in your joomla’s base folder to .htaccess. If you joomla site is install in subfolder then edit .htaccess and uncomment RewriteBase/ by removing # from starting of line. Now specify you folder name after / . e.g. RewriteBase/ Tstjoomla.
2. In Backend go to global configuration Page.
3. Now enable SEF(Search Engine Freindly) Url and Save it. Check your frontend site. Your site Url look like this http://www.example.com/index.php/option/com_login/view/login
4. To remove index.php from url we have to enable Mod_rewrite/Url Rewriting. Now our Url look like this Http://www.example.com/option/com_login/view/login
5. If you want to add suffix to url like .html you have to enable Add suffix to url.
6. Open the Plugin Manager and enable the System – SEF plugin. This plugin adds SEF support to links in your Joomla articles. It operates directly on the HTML and does not require a special tag.
Now our site has search engine and human friendly url. But joomla default SEFplugin does not handle 301 redirection like non www domain to www domain for eg. (example.com to www.example .com) site etc and generated sef urls are not much readable.
If you want to control generated Sef url style or pattern and also want to use different pattern for different component depending upon parameter s in url you must need joomla extensions like ARTIO joomsef component and plugin. Which provide you full control on generated sef url and also manage 301 redirection. It gives extensions for components to rewrite their url according to parameter and rules set in that extension.