Joomla Search Engine Optimization (SEO)

About Joomla

Joomla is an extremely popular open source Content Management System. It is written in PHP and one if its nice features is Search Engine Optimisation. To achieve the SEO Joomla provides a set of rewrite rules that work with Apache, but these rules need some tweaking if you intend to run Joomla SEO with Zeus Web Server.

How SEO works

The SEO in Joomla works by taking a URL like http://www.abc.com/index.php?option=com_content&task=view&id=35&itemid=12 and rewriting it to http://www.abc.com/content/view/35/12. Doing this makes the search engine index every page rather than just index.php. The problem with this is the web server needs to rewrite the SEO URL back to the real URL when the client requests it. The rewrite URLs below will achieve this in ZWS.

Rewriting SEO URLs in ZWS

If you have real paths that match /content/ or /component/ then you need to check that the request isn't for a real file. Only use this code if you actually need it because it requires a lot more processing time than the alternative below. You will need to use this rewrite rule:

match URL into $ with (/content/|/component/) if matched then map path into SCRATCH:path from %{URL} look for file at %{SCRATCH:path} if not exists then look for dir at %{SCRATCH:path} if not exists then set URL = /index.php endif

If you don't have real paths like /content/ or /component/ then you only need this:

match URL into $ with (/content/|/component/) if matched then set URL = /index.php

You need to ensure that in the ZWS rewrite request section, the option to rewrite URI "Overwriting the Request URI" is set to "Leave URI unchanged". Joomla splits the URI at "/" to find the options sent to it, so rewriting must leave the original URI alone.

Mark Boddington [Zeus Systems Engineering] 31 October 2006 Bookmark with del.icio.us Post this article to Digg Post this article to reddit Post this article to Facebook Tweet this article 40 comments  

Comments:

This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.

Comment from: James [Visitor]
Where do I use this ?? Used to using apache and hence .htaccess, just wondering where to paste this text in order to get the joomla seo to work !!

Cheers
Permalink 09 November 2006 @ 19:14
Comment from: Mark Boddington [Zeus Systems Engineering]
These rules should be added to the "Request Rewriting" section of your virtual server.
Permalink 13 November 2006 @ 20:05
Comment from: Eric Kaps [Visitor] · http://www.ingenious-resourcing.com
Mark,

Do you have any more information on this, perhaps at a level Joomla newbies/not-very-advanced-web-developers could understand?

Specifically, how does one do this: "These rules should be added to the "Request Rewriting" section of your virtual server."

Thanks

"Wondering whether switching to an Apache host would be simpler?"
Permalink 14 February 2007 @ 17:19
Comment from: Mark Boddington [Zeus Systems Engineering]
Hi Eric,

From the ZWS admin interface you would select the virtual server you are using with Joomla and then click the configure button. Next, navigate to "URL Handling" -> "Request Rewriting". You will then need to enable the rewrite engine and cut/paste the code above into the "Rewrite Script" input box and click "Apply Changes".

Hope that helps.

Mark
Permalink 22 February 2007 @ 13:06
Comment from: Jude Novak [Visitor] · http://www.futuratraining.com.au
Hi Mark,

You're a life saver. This worked great with my site. I was just wondering if you could go one step further and let me know how I could use the ARTIO Joomsef 3rd party component with these rewrite rules.

Thanks

Jude
Permalink 03 April 2007 @ 07:00
Comment from: Mark Boddington [Zeus Systems Engineering]
Hi Jude,

I haven't tested this, but I read through the JoomSEF documentation quickly and I think all you need to do is remove the if match condition. So it looks like this:

map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if not exists then look for dir at %{SCRATCH:path}
if not exists then set URL = /index.php

Good Luck :-)
Permalink 05 April 2007 @ 16:08
Comment from: Donovan [Visitor] · http://www.themarketingcoach.com.au
G'Day,

- I was wondering if anyone had any ZEUS Dynamic Control files they created from the Joomla 1.0.12 or 1.5 Beta 2 htaccess.txt file that is shipped with Joomla that would be prepared to share?
- I am struggling to get this going as I am a newbie to ZEUS having been with Apache for a long time.

TIA
Permalink 23 May 2007 @ 12:58
Comment from: James Vadas [Visitor] · http://seopro.com.au/
Hello there,

Will this conversion also work with Joomla 1.5?

I am needing to choose between 1 and 1.5, but if i can't put it on Zeus, then i'll need to go v1.

Thanks in advance,

James.
Permalink 13 August 2007 @ 19:21
Comment from: Brendan [Visitor] · http://directsalesinstitute.com.au/
Joomla 1.5 actually has a module to avoid the need for .htaccess. Activate it in Global Configuration.
Permalink 04 December 2007 @ 10:09
Comment from: Jim [Visitor] · http://www.beyond.com.au/
This is all good info. I have got my url's to look like this 'http://www.abc.com/content/view/35/12' using the code above. Thankyou.

My problem is getting the url's to look like this 'http://www.abc.com/content/news.html', as is achieved using 3rd party components such as ARTIO Joomsef and sh404SEF running on apache servers.

I think this is important as it has a url that makes sense and ranks higher that the standard re-write.

Mark, for Joomsef, you mentioned to try removing the if match condition. So the Request Rewriting looks like this:

map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if not exists then look for dir at %{SCRATCH:path}
if not exists then set URL = /index.php

I can't get it to work.
Both ARTIO Joomsef and sh404SEF ask for a .htaccess file, do you know how I should configure it?

I can't find any support or anyone that knows how to achieved this. It would be worth while having this in you documentation.

I really don't want to go back to apache.

Thanks in advance

Jim


Permalink 16 January 2008 @ 12:35
Comment from: Rob [Visitor] · http://www.lbws.com.au
Hi, I have tried the same. I recently received had an email from JoomSEF that said - "There is no such documentation. We have never tested JoomSEF with Zeus, only Apache and IIS are officially supported. Sp as regards Zeus server, you are on your own. Sorry." Unless there is documentation I would host your Joomla site on Apache.
Permalink 17 January 2008 @ 10:36
Comment from: Justin [Visitor] · http://www.allmediasolutions.com.au
I reluctantly set up one of my client websites on a zues server with netregistry. The re-write script you just mentioned is the only one i can get to work. I also use ARTIO Joomsef.

map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if not exists then look for dir at %{SCRATCH:path}
if not exists then set URL = /index.php

Firstly - enable the script last.

1. enable ARTIO Joomsef
2. switch SEO on in config
3. enable re-write script in zeus admin

I only noticed one problem with this though.. can't login to administrator when script is enabled. so disable, then log back into administrator and turn seo off in config to do any changes, then switch on again and ENAbLE re-write script.
Permalink 18 February 2008 @ 16:00
Comment from: Justin [Visitor] · http://www.allmediasolutions.com.au
Sorry forgot to mention it does create relevant urls.

content/news.php
Permalink 18 February 2008 @ 16:03
Comment from: Fitzxp [Visitor] · http://www.datasteps.com
Is there by any chance someone out there whom would know if this can be achieved when using caucho Resin 3.x Services? I am trying to pull off SEO friendly urls but have not been successful with this process yet. Any help would be very much welcomed.
Permalink 25 April 2008 @ 15:24
Comment from: Cameron [Visitor] · http://www.advantagebi.com
I have Joomla 1.0.10 running on Netregistry's Zeus web server, with ArtioSEF component installed. I followed Justin's comment above, and found the same problem with the admin console. I fixed it by adding a couple of lines to the top and bottom of his code:

match URL into $ with (/administrator/)
if not matched then
map path into SCRATCH:path from %{URL}
look for file at %{SCRATCH:path}
if not exists then look for dir at %{SCRATCH:path}
if not exists then set URL = /index.php
endif

Permalink 08 June 2008 @ 03:32
Comment from: Chris [Visitor] · http://www.nab.com.au
Hi
I've just put together a Joomla site running on Zeus that's hosted by netregistry.com.au.

Cameron's fix worked really well for me to get SEF URL's working (I'm using Joomla 1.5.3).

However, I'm now trying to permanently redirect all traffic from www.mydomain.com to www.mydomain.com/joomla (where my app is installed)

If I was on Apache I think It would be a case of adding 'Rewritebase /joomla' to .htaccess

On Zeus I presume it might require something similar to the rewrite scripts posted above.

Any ideas much appreciated.

Chris
Permalink 22 October 2008 @ 23:29
Comment from: Marcelo [Visitor] · http://www.cafepress.com/tshirtmaster
Hi, what about if i have no access to the ZWS admin interface? i have a web site that is hosted on ZWS but is a shared server, how can i do it? as a These rules should be added to the "Request Rewriting" section of a virtual server, may i create some file at my document root with directives or something like that ?
Thank you in advance.
Permalink 31 October 2008 @ 16:27
Comment from: David [Visitor] · http://www.beauxarts-solutions.com
@ Chris

Hi Chris,

in your NetRegistry Console you should be able to define your Server Index Pages. If you would set a page that redirects to your joomla directory as index page you should be fine.

Put this in the header of your redirecting index page:






and following within the body tag, e.g.




Hope that helped,
David

Permalink 28 December 2008 @ 22:59
Comment from: Karen [Visitor] · http://www.activatechurch.com
Hi Chris/David,

Did you get this working in your scenario? I am in the same situation in that I redirect from the index page to a subdirectory where joomla is installed.

In your comment above, I can't see what to put in the header and body tag. Can you pls post your idea again?

Thanks in advance.

Cheers,
Karen
Permalink 07 February 2009 @ 10:26
Comment from: markabey [Member]
SEO works nicely in joomla 1.5 and sh404SEF without a need for rewrite script. However it puts a /index.php/ into the URL which looks ugly. So I used this rewrite script to remove it and enabled mod_rewrite and custom suffix -> .html in sh404SEF config so links were displayed properly (/news.html instead of /index.php/news.html)


rewrite.script
#looks for urls ending in .html in the joomla
#directory.
#takes the part of the url in () . = any char other
#than newline, *= any length
#puts the info in () into a $ array at position 1
#skips admin directory

match URL into $ with (/administrator/)
if not matched then
match URL into $ with ^/(.*)\.html

#rewrites the url to include /index.php/ and
#inserts the data back into the filename with $1

if matched set URL=/index.php/$1.html
endif


It seems to work ok, is it sensible script, or vulnerable? Anyone got any optimisations (this seems to be the only joomla/zeus discussion)
Permalink 03 March 2009 @ 12:26
Comment from: Sales-Training [Visitor] · http://www.actionselling.com
Chris

Why would you want to all your traffic to go to www.mydomain.com/joomla? That means if you do any SEO/SEM you'd have to use www.mydomain.com/joomla in all your backlink campaigns. Then do a redirect for all your www.mydomain.com links out there. Maybe you can share why you want to do this.

Always be training.
Permalink 09 March 2009 @ 17:34
Comment from: Rupak Shakya [Visitor] · http://brulebebe.com.au
Hello,

We are using the joomla v1.5 and tried to follow the instruction on the above but it didn't worked for us. Could you please make suggestions or send us the sample code.

Thank you
Rupak
Permalink 19 May 2009 @ 07:12
Comment from: Pete [Visitor] · http://www.businessservicesuk.com
I struggled to get this conversion to work with Joomla 1.5?

Any suggestions?

Thanks in advance,

Pete
Permalink 24 August 2009 @ 01:33
Comment from: Websphere Developer [Visitor] · http://www.thejavacode.com
I'm new to Joomla and I was looking for an extension to make it have permalinks
I'm hosting my doain on godaddy
will these rewrite rules work on godaddy?

Permalink 10 September 2010 @ 13:42
Comment from: Health and Fitness [Visitor] · http://www.bestfitnessandhealth.com
does it matter which version of apache this will work?
do they have any new extensions that can be installed and it does the job
I searched and I cannot find anything
Permalink 10 September 2010 @ 13:48
Comment from: Paul Bursnall [Visitor] · http://www.gasscotland.com
I'm having an equally hard time with this! I don't have access to the Request Rewriting section via my host (Namesco). I've tried the above rules and 10+ different rewrite.script files in the root of my site, and not a single one works. Quite a few work for menu links, none of them work for quickjump or footer links. Unless someone from Zeus can provide clear, working documentation on this (in an understandable) format, I'll be moving to an Apache host...
Permalink 10 September 2010 @ 15:58
Comment from: Mike [Visitor] · http://www.ryzeup.com
You have given some nice details about joomla search engine optimization. Thanks for sharing and keep up the good work.
Permalink 14 September 2010 @ 13:59
Comment from: Toan Duong [Visitor] · http://www.pixelsdesign.com.au
I have problems installing plugins.
It keeps on giving me this sort of errors:


* FTP::mkdir: Bad response
* JFTP::mkdir: Bad response
* JFolder::files: Path does not point to a valid folder or the folder has been deleted.
* JFolder::folder: Path does not point to a valid folder or the folder has been deleted.
* JFolder::files: Path does not point to a valid folder or the folder has been deleted.
* Error! Could not find a Joomla! XML setup file in the package.


Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /clientdata/zeus-dynamic-1/c/l/xxxxxxxxxxx.com.au/www/libraries/joomla/installer/helper.php on line 142

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /clientdata/zeus-dynamic-1/c/l/xxxxxxxxxxx.com.au/www/libraries/joomla/installer/helper.php on line 142

Warning: Invalid argument supplied for foreach() in /clientdata/zeus-dynamic-1/c/l/xxxxxxxxxxx.com.au/www/libraries/joomla/installer/helper.php on line 187


is this a rewrite issue as well?
Permalink 13 October 2010 @ 03:19
Comment from: saranggola awards [Visitor] · http://mariaespievidal.wordpress.com
This awesome blog has helped me a lot in my research. Thank you for the tips and information.
Permalink 25 October 2010 @ 17:09
Comment from: the 5 minute membership site [Visitor] · http://www.hubpages.com/hub/5-Minute-Membership-Sites
great site full of great content
Permalink 03 November 2010 @ 17:24
Comment from: SEO India [Visitor] · http://www.searcheccentric.com/
Joomla is the one of the best CMS(Content management System) working from a very long time decade. URL rewrite is the process of simplified the url additional @ star and additional character which is automatic generated in Joomla websites.
Permalink 16 May 2011 @ 11:14
Comment from: Peter Rafferty [Visitor] · http://www.arcitsolutions.co.uk/
Cheers for the tips. I have just released a new site and I need all the SEO tips I can get.

Permalink 09 September 2011 @ 14:31
Comment from: kinny [Member]
Thanks for explaining SEO in Joomla works and even the rewriting SEO URLs in ZWS. It had made my work easy.

SEO India
Permalink 05 October 2011 @ 13:08
Comment from: seo india [Visitor] · http://www.gabblet.com
I even told my friends to take a look at your blog and in fact your blog is already bookmarked on my computer. Hope to see more of this. Great..
Permalink 07 October 2011 @ 06:33
Comment from: SEO Cambridge [Member]
Will the shsef404 plugin for Joomla work on Zeus? On Apache this relies in the Rewrite rule being switched on.

Thx in advance

Ed
Permalink 30 November 2011 @ 16:06
Comment from: sneha [Member]
It's very nice post.
Mediarun has been providing London SEO services and website optimisation services to clients spread over fashion, retail, travel and financial sectors.
SEO London

Permalink 25 December 2011 @ 15:42
Comment from: SEO Services India [Visitor] · http://www.searcheccentric.com/seo-services-india.html
Wow!! It was a great article. It’s really beneficial for effective search engine optimization. New techniques in SEO are always welcome from my side. I expect this type of creative posts from your side. Thanks for sharing it.
Permalink 11 January 2012 @ 13:43
Comment from: Marco [Visitor] · http://www.beautifulpuglia.com
Hi, I've created a rewrite.script file and added it to the root folder. All looks perfect, the index.php disappeared from the URL but now I can't access the backend of my Joomla site. Any suggestions? Thanks
Permalink 22 February 2012 @ 09:38
Comment from: angus [Visitor] · http://www.business-cheshire.co.uk
is there a difference in the rewite.script for joomla 2.5,

i have been running joomla 1.5 sites for years with the following code code:

RULE_0_START:
# get the document root
map path into SCRATCH:DOCROOT from /
# initialize our variables
set SCRATCH:ORIG_URL = %{URL}
set SCRATCH:REQUEST_URI = %{URL}

# see if theres any queries in our URL
match URL into $ with ^(.*)\?(.*)$
if matched then
set SCRATCH:REQUEST_URI = $1
set SCRATCH:QUERY_STRING = $2
endif
RULE_0_END:

RULE_1_START:
# prepare to search for file, rewrite if its not found
set SCRATCH:REQUEST_FILENAME = %{SCRATCH:DOCROOT}
set SCRATCH:REQUEST_FILENAME . %{SCRATCH:REQUEST_URI}

# check to see if the file requested is an actual file or
# a directory with possibly an index. don’t rewrite if so
look for file at %{SCRATCH:REQUEST_FILENAME}
if not exists then
look for dir at %{SCRATCH:REQUEST_FILENAME}
if not exists then
set URL = /index.php?q=%{SCRATCH:REQUEST_URI}
goto QSA_RULE_START
endif
endif

# if we made it here then its a file or dir and no rewrite
goto END
RULE_1_END:

QSA_RULE_START:
# append the query string if there was one originally
# the same as [QSA,L] for apache
match SCRATCH:ORIG_URL into % with \?(.*)$
if matched then
set URL = %{URL}&%{SCRATCH:QUERY_STRING}
endif
goto END
QSA_RULE_END:

Can any one tell how to edit this code to work with 2.5.
Permalink 28 May 2012 @ 13:51
Comment from: Marie Nicol [Visitor] · http://www.luxurypatiofurniture.co.uk
I have not know that URLs of the pages build using Joomla are being redirected so that they are easier to index. Good to know maybe I will build my next page using that CMS.
Permalink 29 May 2012 @ 23:12

Comments are closed for this post.

Recently...

Other Resources