Enable Search Engine Friendly (SEF) URLs in Joomla!
1) First you should make some changes in your configuration file of your Apache web server. Well, SEF in Joomla is for Apache web server only. Your server should have mod_rewrite enabled and it must allow .htaccess override. For doing this, follow the simple steps below:
The configuration file named “httpd.conf” is located in the folder named “conf” of your Apache web server. Open the file httpd.conf in any text editor of your choice. Search for “mod_rewrite”. You will find
“#LoadModule rewrite_module modules/mod_rewrite.so”, i.e. the mod_rewrite is not enabled. Uncomment it by deleting the ‘#’. Hence, mod_rewrite is enabled.
Now, in the same file i.e. httpd.conf, search for “.htaccess”. You will find a line saying “AllowOverride controls what directives may be placed in .htaccess files.” Look below this line. You will find “Allowoverride None”. Make it “Allowoverride All”. Hence, .htaccess override is allowed.
2) Now go to the administration section of your joomla site.
3) Navigate to Site >> Global Configuration
4) Select the SEO tab.
5) Select the Yes radio box next to the Search Engine Friendly URLs descriptor.
6) Now, the site will show an alert saying “Remember to rename htaccess.txt file to .htaccess”. Click ok button.
7) Click Save.
8 ) Now, we have to rename the htaccess.txt file to .htaccess. But before renaming it, we have to make some changes in the file.
9) Open the file htaccess.txt in any text editor of your choice.
10) Search for
“RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]”
11) In the first result of your search, you will find instruction on what should be changed in the line you have searched, i.e. the line above in 10).
The change to be made is that if you have installed your joomla files in the folder named “joomla” inside of your root folder, then the above line should be changed as: “RewriteCond %{REQUEST_URI} ^(/joomla/component/option,com) [NC,OR]” and don’t forget to uncomment it, i.e. by removing the ‘#’ present at the start of the line.
12) Now, rename the htaccess.txt file to .htaccess. You can to this by some FTP/editor program or by opening the file and saving for all types as .htaccess.
13) All well done! Restart your Apache web server.
14) You will notice that sections/content/items have nice URLs like:
http://www.yoursite.com/content/section/1/2/
instead of
http://www.yoursite.com/index.php?option=com_content&task=section&id=1&Itemid=2
and components have URLs like:
http://www.yoursite.com/component/option,com_search/Itemid,5/
instead of
http://www.yoursite.com/index.php?option=com_search&Itemid=5
Enjoy !!!


Leave your response!