| Force JoomSef to understand directory structure (trailing slash) |
| Thursday, 24 April 2008 | |
|
Ok, let me explain what do I mean with this title. I'm using Artio JoomSef component for SEO urls on Joomla 1.0.x. Link to root of my sections and categories end with /index.html for an example: http://www.vitez-studios.com/section/category/index.html However, I have found out that Google bot is trying to open http://www.vitez-studios.com/section/category/without index file, assuming that it will retrieve different content. Of course, Google has received a lot of 404 errors which might compromise my web site indexing. I decided to do some changes in JoomSef code. The plan was to automatically redirect all request urls which may be directories without ending slashes, to same urls with glued index.html If you would like to add such compatibility to your JoomSef component read the following. Please note that my changes wont add new records to JoomSef mysql tables. If no url is found in database, JoomSef will check for additional url with index.html at the end of string. If match is found, Joomla will redirect user with http error code 302, instead of responding with error code 404.open your Joomla root directory and open this file components/com_sef/sef_ext.php Find function revert() in class sef_joomsef. Look for this code if ($row) {Add this code right before! /*--------------------------- Thats it, try it. If you experience problems feel free to contact me ;) |