Home arrow Installing sh404
sh404 Install Guide PDF Print E-mail



Install and/or upgrade sh404SEF for Joomla


[this page is a work in progress - please check back later if details you need have not yet been included - and tell us if there's anything you want to see in it - use our forum]

This install guide for sh404 is not in any way an official version or approved. It is an attempt to answer questions that people sometimes have when installing sh404 in Joomla; and also the upgrade sh404 issues. The more material available on these subjects the better, as users can more easily find what they need.

In many peoples' opinion the sh404SEF (search engine friendly) URL and Meta solution is the best of many available for Joomla. It reconstructs URLs in a choice of formats, solves all sorts of problems inherent in dynamic URLs, allows custom per-page metadata, and adds some important security functions. It also handles many of the complex Joomla components faultlessly, with built-in plugins specially for them. The developer is one of the most active in the entire project, and his support is without equal. A new version is released monthly or more often. At present there is no native support for the newer 1.5 series of Joomla - but only a small percentage of users have moved over to this in any case, as Joomla is basically all about the plugins, and as yet they aren't there for for J 1.5, unfortunately.

Usually, the install will go without fault; but occasionally there are glitches. Here is a basic installation, upgrade and troubleshooting guide for the sh404 Joomla plugin.

The sh404 Guide

We have provided this simple and basic user guide for sh404SEF in order to help those with basic questions to find the answers quicker. The developer's website (see links at foot) is well-known to provide just about the best support of any Joomla plugin - and Yannick (the chief dev) replies faster than anyone we know. However, there are always two issues with such support sites:

1. Big extension support sites like this are large and complex. It may not be easy to quickly locate the answer to simple questions.

2. There are always documentation and usability issues on OSS support sites, for very good reasons: it's open source free software, so the developers have a lot of work to do, at low returns, without getting paid for the huge amount of support work necessary, that commercial software developers get paid for. Realistically, documentation has to be the last on the list of priorities.

We'd like to help but the only feasible way is to provide additional resources.


What sh404SEF for Joomla does

The plugin consists of two parts, a component and a module. The component provides the SEF URL rewrites, and the module does the new, unique meta - if you want this. Both parts have to be configured correctly or they won't work.

Note carefully that there is no default working arrangement directly after install.

Here are the 4 main functions of sh404 -

1. URL rewrites
Firstly, the most important thing this plugin does is to rewrite the long, raw dynamic URLs (page addresses) that the CMS produces. It changes them to people-friendly and search engine friendly alternatives that are much shorter, and also much more relevant to the page content.
 

2. URL manager
It acts - very important this - as an URL manager: multiple URLs are deleted; custom one-off URLs can be created; the default index page URL can be set; and so on.

3. Custom meta
The plugin also creates custom metadata. You can control several meta fields and input your own values on a per-page basis. That might of course be a major task on a big site - but the option is there if you need it. The sensible thing to do in such cases would be to at least give the main section and category pages - or whatever you call them - the full treatment.

4. Extra security layer
An extra security layer is provided, since the component has an excellent level of self-protection that extends to protecting the site as well. It rejects many forms of bot probes and worm attacks. For example it automatically 403s anything with script, html, or mosConfig in the URL request. A flooding defence is also built-in; though you will normally need to set this higher than the default, otherwise you'll find yourself barred, especially when using a forum. When using a forum, and requesting a page, a lot of HTTP requests get bundled together and that will trigger the flood blocker. Set the parameters higher (try 20 + 20).


How the sh404 URL rewrite works

The rewrite component does this by using one of the following two methods:

1. It rewrites the URLs entirely within the application, without recourse to an htaccess file. No htaccess is needed but the URLs produced may not suit everyone. This is called the 'No Htaccess Option'. This option can also be used successfully on IIS servers.

2. It works with the htaccess file to rewrite the URLs for best effect. This requires a custom htaccess file, different from the standard Joomla one. This is called the 'With Htaccess Option'. This option cannot be used on IIS
(Windows) servers.

In format (1), the URLs include a /index.php/ parameter in the middle of the filepath. Many don't like this, although it has absolutely no effect whatsoever on search results (proof: see this site, global #1 - #3 for several terms).

We use that version of the solution here because in theory it is a purer solution - working, as it should, entirely within the application and not using server resources*; and because it just allows us to forget that side of things and let it do its stuff. There's no htaccess file in the webroot with this method. As stated, it doesn't affect the search results or the usability of the site in any way - so as far as we are concerned it is perfectly acceptable. It's true that people tend to 'prefer' the URLs without the extraneous index.php in the middle, so on clients' sites we tend to use the With Htaccess Option.
* Advanced users: yes, of course, it still has to be executed on the server so in a sense this is incorrect; but it avoids the server having to parse an htaccess file for each HTTP request, which will take more overhead. It's a bit like the debate on whether an electric car is 'greener' or not - because it simply transfers the energy requirement to a power station burning fuels, instead of burning the fuels directly itself. The answer is probably that yes, it's greener (only because of economies of scale, of course) - but not as much as you might have thought if you hadn't considered this factor :)

In format (2) the URLs are of perfect form, and can be structured to suit your requirements: with or without a Section or Category parameter within the filepath, and with an html or htm extension. This requires a standard Joomla 3PD htaccess, as supplied with the CMS for alternate use.

You should delete or comment out the core SEF section and uncomment the 3PD section to enable the sh404 functionality.



sh404 on an IIS server

The plugin is not supported when Joomla is running on an IIS server. That's for several reasons, one of which is that ultimate configuration of any URL setting is best done with an htaccess file - and there isn't one on Windows servers. Windows servers are a lost cause as far as management goes unless you have your own dedicated server, with full access to the IIS Manager. As that might apply to perhaps 0.001% of website owners, it's hardly a priority here. All problems can be resolved by changing to a normal server.

Nevertheless, there is now an sh404 setting that allows it to run on an IIS server: the 'No Htaccess Option'. If you select this in the master configs for sh404 then it will usually run OK. If it doesn't, then the developer cannot support Windows options but you'll find a board for this within the forum on the dev's site (see links at foot of page); other IIS server users will probably help you out.


sh404 Installation

Joomla has an SEF URL solution built in, and it's OK - but it's not precisely right, and so sh404 can be used to perfect the results.

The first thing to realise is that the sh404 plugin WILL NOT WORK unless:

1. SEF URLs are enabled in Joomla Global Config.
2. Joomla core SEF URLs (ie without the sh404 plugin) ARE WORKING 100% FIRST.
3. "ON" is enabled within the sh404 component configuration.
4. The htaccess file has been changed, for the 3PD SEF version.

So from this we can clearly see that first we have to get Joomla working fine with the core SEF solution. It's pointless trying to troubleshoot the sh404 component if SEF URLs aren't working anyway!!

>> THIS IS THE PRIME CAUSE OF THE PROBLEM IN SH404 NO-GO SITUATIONS <<

So, if you like, you can go ahead and install sh404, then enable it and get it running. But if it doesn't work for some reason - then your first task must be to

     ### GET THE CORE SEF URL SOLUTION WORKING FIRST ###



Download the sh404SEF plugin

Make sure you get the latest release for either the 1.0x series of Joomla, or the 1.5x series. See foot of page for links. 

Go into your admin backend and set files to CHMOD - that means, ensure the files and directories on the server can be written to, by setting the correct file permissions. Go here:
Admin backend - text menu list at top - Site - Global Config - the Server tab - File Permissions - and set up as follows.
Check the  --Apply to existing files-- button on right.
Check the  --Make unwriteable after saving-- button at top.
You can set the file permissions to whatever you want or find advised elsewhere. There is a conflict between 'opening them up' so they are easy to write to, and so that installs go without problem; and 'locking them down' so that script kiddies can't get into them.
You can try this version but if a plugin installation won't run correctly you'll need to open them more. On the other hand you could lock them down a bit more than this, after any install.
Don't forget to apply this to existing files.
Don't forget to make the main config file Unwriteable.
File permissions: 0754 (you'll have to tick / untick the boxes till you get this).
Directory (folder) permissions: 0754
You'll see plenty of contradictory advice on these so go with whatever you want. If you can't install something, open it up more. After an install, close them up.
(And Register Globals, just below this, must be OFF).

Then go to: Installers - Components,
In the text box below, to the right, click the Browse button.
Locate the sh404SEF zip file you downloaded from the web (you don't unzip it first - it's unzipped up on the server).
Click Upload & Install.

All being well, after a minute or two you'll see a Success notice.
Hit Continue.

That's it for the basic install - if it fails, see the section below.


If sh404 doesn't work

sh404 install fails

If the installation fails, then we need to look at these options:

1. Did you install via the admin backend, using the correct zip file?
2. Is there an older version of sh404 (or any SEF) already there?
3. Are the server file permissions correct?

We'll work through these.
[to be continued later]


sh404 installs OK but doesn't work

If you find that the sh404 installation installs OK but doesn't work, here are your options.
 
1. Check all the configs are right:

  • Joomla global
  • sh404 main config

2. If still no luck, then get the core SEF working. If this runs OK we know that the problem is not with the server, or with the basic htaccess file. Then we can look at the 3PD htaccess file situation; a server issue maybe; then,
possibly a compatibility issue with another plugin. Plugin issues are a big player here, and if you have got 20 big plugins like Community Builder and Remository, then things can get complicated.

The correct way to implement a large install like this is to do the SEF URL solution FIRST and the plugins AFTER.
 

Upgrade errors with sh404

Upgrading is not always simple with this component. It's not a problem, there are ways to mitigate this. Firstly, you need to carry out the correct procedure:

1. Perform a full database backup. At least TWO FULL SEPARATE WAYS are necessary to ensure that you have a good working backup. Always test out a new way of obtaining a DB backup to ensure it works: import it to a website and see if it runs correctly. Check a backup in this way monthly. For instance you could use a phpMyAdmin backup via your control panel; and a PU_DB-admin backup within Joomla. We use these and know they work. We have had problems with other popular solutions.
2. Go into the admin backend.
3. Backup all your data: export all your SEF URLs and save them. Export all your Meta tags and save them. Export any Custom URLs or Meta and save them.
4. Go to the sh404 configuration parameters and ENSURE that the default setting, maintain config parameters on upgrade, is still checked.
5. Go to Installers - Components. Look down the page to the list of components that are currently installed. Check the box against the sh404 component. Go to the top right and Uninstall it.
6. Via Installers - Components, install the new sh404 version - browse to the zip file on your PC, 'Open' it, Upload & Install it.

This is the correct procedure and should install the component (and associated module) correctly. Uninstalling the old version does not lose the configs or the SEF URLs (normally!).

Upgrade errors

Sometimes errors are encountered. Often these are the result of not uninstalling the old sh404 version first. Although this is not in theory necessary, it always works best.

Here is a typical upgrade Failure error message:

-----------------------
Failed to copy file:


components/com_sef/
/administrator/components/com_sef/

-----------------------

The reason that an upgrade install frequently fails is because uninstallation of the old version did not complete correctly within the upgrade process. The old files are still occupying the webspace that the new files require. This can happen because of file permission settings and other server peculiarities that prevent a smooth upgrade taking place. Therefore, it's best to uninstall the old version manually first. And if that fails, go in via FTP and delete the folders yourself.

In the example above:
Delete these directories via FTP.
Check server file permissions are OK (ie, open them up a bit if necessary).
Reinstall the new sh404 version.


Internal Server Error 500 with sh404

If you cannot access the site and you get a 500 error: what did you just do?

Chances are you just changed the htaccess file, as this fail type normally results from an error in here. Replace the htaccess file with your backup.

You'll find that one line of your htaccess file is faulty (for that particular server) and does not permit correct operation. You could try the htaccess file for sh404 we give you right down at the bottom. It's a lot clearer than the default 3PD version that comes with Joomla (even though it's identical of course), as we ditched all the junk.

GET THE CORE SEF SOLUTION WORKING PERFECTLY FIRST.

Unresolvable sh404 issues

In every case we have seen where the SEF URLs or meta didn't work, and none of the preceding methods solved the problem, it has always been a compatibility problem with another plugin. Some webmasters get 30 plugins, some of major size and effect, then last of all try to install the sh404 component.

!THIS IS THE WRONG WAY TO DO IT!

Since the SEF URLs are the most important factor for every site (if you want any traffic), you should install this FIRST. Then worry about the other stuff.

If you follow this methodology you won't have any trouble. So install sh404 first - then other components, one by one, testing as you go - and things will be fine. If there is a problem at any stage, you can see PRECISELY which plugin caused it.

If you've got problems with a big site, with lots of plugins, after you install sh404 - then you can try unpublishing the other plugins to see which is causing the glitch. Maybe you'll be lucky. If necessary, unpublish absolutely everything, then republish them one by one, seeing how they work with sh404.

But you might find the only solution is to uninstall everything - reinstall sh404 - then reinstall each component. That is the best policy in the first place.

The SEF URL solution has priority over everything else and you need to remember that.


Using the sh404 metadata solution

The plugin also includes a custom meta solution, in the form of a module, that allows you to create perfect, unique metadata for each page of your site.

The advantage of this, of course, is that this has unbeatable value for SEO, since it is one of the primary requirements - boilerplate meta is useless.

The disadvantage is you'll have to fill the meta for each page manually...

Enabling the sh404 meta module

By default, the module is not published - ie it is disabled. That means you still have your global metadata running.

To fix this you need to do two things:

1. Position the module in THE LAST MODULE POSITION ON YOUR TEMPLATE.

2. Publish it.

The module has to come in last or it won't work correctly. However, sometimes you'll find it can't be placed in the absolute last position (such as Debug) because it leaves a 'ghost' module shadow - a small placeholder that shows a module is published there, but without any content. If that happens, then just come back up one module position, and put it there, at one position higher.

If there is already something in that position, that's OK, put it in there as well - but place it last, after the other item in the same position. This is done in the Module Manager list, by numbering it below the other item. Simple when you know!



An htaccess file example for sh404

Here is a simple, basic htaccess file for sh404. This is the minimum that needs to be included to get sh404 to work. There is a lot more that could - and should - be included in an htaccess file. You can ask your SEO consultants or maybe your site hosts what else should go in there - this is their game.

In the file below, the first line (RewriteEngine On) is always included even though it may not be necessary - it does no harm.

The second line may be necessary (Options +FollowSymLinks) if it has not been included in the server's main config file - so if your htaccess file doesn't work, then uncomment this line so that it is operational. if there is still no result, comment it out again and proceed to the next step.

The third line (RewriteBase /) is only necessary on a few servers. Again, uncomment it if previous efforts don't work. If no result, try both of those lines uncommented.

Note that this line, RewriteBase /, often needs a folder level added so that the server knows exactly how to rewrite the base URL. Your site hosts will assist. For example this is required by sites on 1&1 hosting.

The main section of the file is for 3rd-party SEF solutions such as sh404 (3PD = 3rd-party developers). It is different from the core SEF htaccess requirements - and both should not exist at the same time! Don't laugh, I've seen it...  The site still works but there are a lot of errors.

--------------------------------------------------
RewriteEngine On

## uncomment the following line if necessary
# Options +FollowSymLinks

## uncomment the following line if necessary

# RewriteBase /

## Joomla 3PD SEF

RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

----------------------------------------------------



Go to this page for more help with htaccess files



 


We hope this tute helped you out - more info will be included as and when!
Tell us what you need to know and we'll include it. Use the forum.


sh404 related links

Developer's website:
http://extensions.siliana.com/forums/


Windows server forum:
http://extensions.siliana.com/forums/index.php?board=23.0


Download link for new sh404 versions:
http://joomlacode.org/gf/project/sh404sef/frs/







 
Bookmark this page:
Spurl
LinkaGoGo
Reddit
NewsVine
Ma.gnolia
Fark
Blinkbits
BlinkList
connotea
feedmelinks
YahooMyWeb
Simpy
© 2008 A3webtech
powered by sail & rum : )