Tuesday, December 7, 2010

SEO in Joomla

To enable SEO function in Joomla, we must do the following matters.

1. Activate mod_rewrite function of Apache by the follows
1.1 Go to xampp\apache\conf (I use xampp package which includes Apache), and open file, httpd
1.2 Find the line #LoadModule rewrite_module modules/mod_rewrite.so
1.3 delete # in this line to turn on mod_rewrite function
1.4 save the file
2. In Joomla Admin Backend, select Global Configuration and then look for SEO settings
2.1 for Search Engine Friendly URLs: choose 'Yes'
2.2 for
Use Apache mod_rewrite: choose 'Yes'
2.2 for Add suffix to URLs: choose 'No'
3. create .htaccess in Joomla directory
3.1 In Joomla directory, open htaccess.txt and replace texts with

Options +FollowSymLinks
RewriteEngine On
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

3.2 Save as and set
File name: .htaccess
Save as type: all types

Now URLs showing will be like,
www.testjoomlaSEO.com/about-us/
instead of www.testjoomlaSEO.com/index.php/about-us

4. remove tag Meta name="generator"
The file you want to edit is called head.php and is found here:
/libraries/joomla/document/html/renderer/head.php

Comment out the following code by inserting "//" in front of it (~line 167):
//$strHtml .= $tab.'generator" content="'.$document->getGenerator().'" />'.$lnEnd;

source: http://www.cocut.cn/tips/48-tips-and-tricks/3282-generator-joomla.html

No comments: