Root Creative - graphic design Glasgow, website design Glasgow

website design | graphic design. this is where it starts.

Joomla SEO friendly URLs using Zeus servers

One of the most frustrating things when setting up your new Joomla website can be making sure you have SEO friendly URLs.  If you use a host that has Apache servers then it can be a rather easy affair, with Joomla! set up to use Apaches mod_rewrite out of the box, and a wealth of information out there on the net about how to use mod_rewrite if you do get into trouble.  If, however, your host uses Zeus servers then its a different story all together.  Zeus servers do not use Apaches mod_rewrite and instead use Zeus rewrite.script which at first can be a little bit difficult to get to grips with.

To ensure SEO friendly URLs while using Zeus servers all that is needed is the following 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:

If your Joomla installation is in the root of your website:

Simply copy and paste the code into a text file,  and then save the file as “rewrite.script”.

Now upload the rewrite.script file to the root directory of your server and then log into your sites Joomla administrator area.  Navigate to the global configuration section and in the site tab, change all the SEO settings to yes, even the one that says use Apache mod_rewrite.

If your Joomla installation is in a sub-folder of your website:

Simply copy and paste the code into a text file,  “set URL = /index.php?q=%{SCRATCH:REQUEST_URI}” to “set URL = /YOUR SUB-FOLDER/index.php?q=%{SCRATCH:REQUEST_URI}” then save the file as “rewrite.script”.

Now upload the rewrite.script file to the same directory that your sub-folder is in on your server and then log into your sites Joomla administrator area.  Navigate to the global configuration section and in the site tab, change all the SEO settings to yes, even the one that says use Apache mod_rewrite.

That’s you done!  Test out your new SEO friendly URLs and revel in your improved search rankings!

comments

  • #34 Raphaele on December 17, 2009

    Thank you so much! Thanks to this post, I finally managed to get my SEF urls working. Well done.

  • #35 Raphaele on December 17, 2009

    Twitted, by the way.

  • #110 David on January 20, 2010

    Thanks for this info. Worked perfectly on my site

  • #173 Liam on February 16, 2010

    If I’m not mistaken ‘Rule 0′ is a 301 re-direct – is this required in the code for SEF URLs?

    • #195 Kevin Brolly on February 22, 2010

      Very well noticed! You are correct, rule 0 was a 301 redirect, and it is not needed for the SEF URL’s, that will teach me for not proof reading it well enough!

      I have edited to remove the 301 re-direct, thanks for bringing that to my attention.

post a comment

contact details

Root Creative Ltd
Unit 18, Elderpark Workspace
100 Elderpark Street
Govan
Glasgow G51 3TR
Scotland

T: +44 (0)141 440 0440
E: info@rootcreative.co.uk

Download vCard...

web

  • Website Design & Development
  • Dynamic Websites
  • E-commerce & shopping carts
  • Search Engine Optimisation (SEO)
  • Content Management Systems (CMS)

print

  • Graphic Design
  • Corporate Identity & re-branding
  • Brochure, leaflet & poster design
  • Large Format Poster printing
  • Print Management

imagery

  • Product Photography
  • Interior & Exterior Photography
  • Traditional Pen & line illustration
  • Computer generated illustration
  • Image manipulation & re-touching

© Root Creative 2009

Validation Tick boxCSS

Sitemap

Root Creative Ltd - Glasgow, Scotland
Company Reg. No. SCO313018