Elxis CMS Forum

General => News and announcements => Topic started by: datahell on March 08, 2008, 14:35:17

Title: SEO PRO fix for Elxis 2008.0
Post by: datahell on March 08, 2008, 14:35:17
This fix only applies to Elxis 2008.0 Olympus rev1891 and to no other prior or future Elxis version (this fix has been already applied to 2008.1).

SEO PRO works fine except if your site is in a sub-directory.
Here is a fix that will make it work for sites in sub-directories too.

Open /includes/sef.php with a text editor such as psPad.
Go to line 49.
Replace this:


   global $mosConfig_absolute_path;

        $seolink = preg_replace('/^([\/])/', '', $_SERVER['REQUEST_URI']);
   $sLink = preg_split('/[\?]/', $seolink);
   $parts = preg_split('/[\/]/', $sLink[0]);


With this:


        global $mosConfig_absolute_path, $mosConfig_live_site;

        $seolink = preg_replace('/^([\/])/', '', $_SERVER['REQUEST_URI']);
   $livesite = parse_url($mosConfig_live_site);
   if (isset($livesite['path']) && ($livesite['path'] != '')) { //site is in sub-directory
      $livesite['path'] = preg_replace('/^([\/])/', '', $livesite['path']);
      $livesite['path'] = preg_replace('/([\/])$/', '', $livesite['path']).'/';
      $seolink = preg_replace('#^('.$livesite['path'].')#', '', $seolink);
   }
   $sLink = preg_split('/[\?]/', $seolink);
   $parts = preg_split('/[\/]/', $sLink[0]);


Save the file, done!

Fix applied to Elxis 2008.1 DEV rev1911
Title: SEO PRO fix for basic SEO components.
Post by: datahell on March 12, 2008, 19:21:54
When you have SEO PRO enabled and you use a component that does not have a SEO PRO extension (i.e. a component for Elxis 2006.x) then you should apply the following fix to /includes/sef.php:

Open /includes/sef.php with a text editor such as psPad.

Find this code block (line 134):

//ERROR 404 EXTENDED CHECK
if (!ereg(',', $parts[0])) {

Replace it with:
 //ERROR 404 EXTENDED CHECK
if (!ereg(',', $seolink)) {

Save the file, done!

Now SEO Basic URLs like /component/option,xxx/Itemid,yy/ will work fine when SEO PRO is enabled.

Fix applied to Elxis 2008.1 DEV rev1913