Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Did you know that
Elxis 5.x
uses HTML5, CSS3 and pure javascript without external libraries such as jQuery?
Home
Help
Login
Register
Elxis CMS Forum
»
General
»
News and announcements
»
SEO PRO fix for Elxis 2008.0
« previous
next »
Print
Pages: [
1
]
Author
Topic: SEO PRO fix for Elxis 2008.0 (Read 22290 times)
datahell
Elxis Team
Hero Member
Posts: 10356
SEO PRO fix for Elxis 2008.0
«
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
«
Last Edit: March 12, 2008, 19:24:41 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
datahell
Elxis Team
Hero Member
Posts: 10356
SEO PRO fix for basic SEO components.
«
Reply #1 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
«
Last Edit: March 12, 2008, 19:23:58 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
General
»
News and announcements
»
SEO PRO fix for Elxis 2008.0