Tech Blog
|
One of the things I've run across in designing and managing multiple Joomla sites for various clients is the problems that seem to come pre-packaged with the out-of-the-box Joomla SEO. I've been running Joomla sites for a couple of years now, and I haven't seen a lot of improvement in the way that SEO works. A quick search of Google reveals that quite a few users have issues with one or more of the following:
It's taken awhile to piece together what exactly has to be done to overcome some of these issues. I'm going to draw it out here so you can see what I've done to solve some of these issues, which can be quite frustrating. If you're here, you've probably noticed that when you chose "Use Apache mod_rewrite" from the General Configuration, your pages stopped working. You probably received either a 404 or 500 error, but looking at your address bar, the link appeared to be doing what it was supposed to (www.example.com/shortened-url). These errors all come back to mod_rewrite and htaccess. So: 1. Make sure mod_rewrite is included in Apache. You can verify this by checking your httpd.conf file (on RH/Centos systems, it's at /etc/httpd/conf/httpd.conf) for the section that says: LoadModule rewrite_module modules/mod_rewrite.so
Make sure that it's there, and that it's not commented out (not preceded by a #). If it's there, great. We can move on to the next step. If not, that's a little beyond the scope of this article, but suffice it to say that you'll have to recompile Apache with that support built in. Most of the major distros already have it built-in. 2. Assuming you've renamed your "htaccess.txt" file to ".htaccess", let's edit the .htaccess file. I use nano, but you can use what you like. nano .htaccess When you get into this file, you'll notice that Joomla generates a lot of text. There are only a couple of things that really pertain to what we're doing, though. First, find the option that says: Options +FollowSymLinks If you're getting 404s or 500s, try commenting that out. That does the job about half the time. I don't have a detailed explanation as to why, but it does work, and hasn't caused any problems in the time that I've used that method. If that doesn't work, the next option we're interested in is: RewriteBase / If you're running multiple sites, you may have them segregated into various folders (site1.com, site2.com, and so on). It's possible that the RewriteBase directory needs to be changed to match your current directory. So, with that in mind, change it to RewriteBase /site1.com Where site1.com is the name of your directory. Save your file and try to access again. 3. If these options don't help you out, keep in mind a couple of things. First, try a combination of turning the options in .htaccess on or off (that is, commenting them out or leaving them un-commented). Also, if you've added any custom rules to this file, you might try commenting those out. Try an incremental approach and see what's breaking it. 4. Worst case scenario: disable the native Joomla SEO and reach for a better solution. I'm not going to recommend any by name, but there are numerous ones available at extensions.joomla.org that may be of assistance to you. That site has a pretty solid rating system that should kind of give you an idea of what people think about them. I hope this article helped you along. Joomla can be tricky, but it's definitely a rewarding experience if you stick with it. I've got a fair few customers using this system, and the successes outweigh the problems you may face. |



