Elxis CMS Forum

Support => Installation => Topic started by: balisto on October 02, 2008, 03:17:17

Title: SEO in 2008.1
Post by: balisto on October 02, 2008, 03:17:17

Hi,

I have installed 2008.0 in a subfolder of my server - SEO Pro works fine (RewriteBase /subfolder1)
I installed 2008.1 in another subfolder of my server - SEO Pro doesn't work (RewriteBase /subfolder2)

I tried any combination of my RewriteBase (with ending slash, without ending slash)... I can't make it work. Both installations are on the same server.

Anything else I can try?

Cheers,
Chris
Title: Re: SEO in 2008.1
Post by: ks-net on October 02, 2008, 04:19:52
htaccess.txt is renamed to .htaccess?
is actived from elxis administrator?
is the line RewriteBase  uncimment?  no (#) in the front.
thats all nothing else to do

seopro works fine in all cases
Title: Re: SEO in 2008.1
Post by: datahell on October 02, 2008, 08:27:22
The following applies only to Elxis 2008.1

Elxis 2008.1's htaccess is diferrent than the 2008.0's.

Sites on www root folder
Just rename it to .htaccess and you are ready.

Sites on sub-directories
If you are on a sub-directory then you have to do some changes to the htaccess file (not tested on real environment yet).
Suppose your installation is accessible from the web like this: http://www.mysite.com/elxis/

First of all set properly the Rewritebase.
RewriteBase /elxis/

Test if it works, if not, then for each of the language re-write rules add the subdirectory name to the url:

from:
RewriteRule ^([hy]{2})/(.*)$ /index.php?mylang=armenian [QSA]
to:
RewriteRule ^([hy]{2})/(.*)$ /elxis/index.php?mylang=armenian [QSA]



Once again, Elxis is a CMS, meaning that is a site itself. We do not recommend installing Elxis on sub-folders.
Title: Re: SEO in 2008.1
Post by: balisto on October 02, 2008, 13:19:23

Hi,

I tried everything you said. Unfortuanately I can't make it work with 2008.1 - Whatever I try, http://www.mysite.com/elxis/ allways gives an "Internal server error" when SEO and .htaccess are in use. With 2008.0 it works without any issues on the same server.

Cheers,
Chris
Title: Re: SEO in 2008.1
Post by: datahell on October 02, 2008, 13:25:47
Chris, if you want, send me with a personal message login information to your site's FTP and I will enable SEO PRO for you.
Title: Re: SEO in 2008.1
Post by: balisto on October 02, 2008, 13:48:35
Hi, PM sent to you. Thanks for helping and keep me updated about what I did wrong ;)
Title: Re: SEO in 2008.1
Post by: datahell on October 02, 2008, 15:40:48
I will check it in the afternoon (in 3-4 hours) and I will reply you here.
Title: Re: SEO in 2008.1
Post by: Amigamerlin on October 03, 2008, 18:46:07
The following applies only to Elxis 2008.1

Elxis 2008.1's htaccess is diferrent than the 2008.0's.

Sites on www root folder
Just rename it to .htaccess and you are ready.

Sites on sub-directories
If you are on a sub-directory then you have to do some changes to the htaccess file (not tested on real environment yet).
Suppose your installation is accessible from the web like this: http://www.mysite.com/elxis/

First of all set properly the Rewritebase.
RewriteBase /elxis/

Test if it works, if not, then for each of the language re-write rules add the subdirectory name to the url:

from:
RewriteRule ^([hy]{2})/(.*)$ /index.php?mylang=armenian [QSA]
to:
RewriteRule ^([hy]{2})/(.*)$ /elxis/index.php?mylang=armenian [QSA]



Once again, Elxis is a CMS, meaning that is a site itself. We do not recommend installing Elxis on sub-folders.

I've tested it in a real environment and it works for me with the suggestion you gave!. 
I've a site installed in a subfolder and SEO pro Active !!

Thank you.
Title: Re: SEO in 2008.1
Post by: datahell on October 03, 2008, 19:15:42
Very nice Amigamerlin, as we had only checked this on local installations.
Thanks.
Title: Re: SEO in 2008.1
Post by: ks-net on October 06, 2008, 02:46:39
working   in subdir with seopro

no need to edit more lines in htaccess other than the Rewritebase rule

Code: [Select]
PHP Built On:  Linux ks-net.gr 2.6.22.1-27.fc7 #1 SMP Tue Jul 17 17:13:26 EDT 2007 i686
Database Version: mysql 5.0.37 (Version: 5.0.37)
PHP Version: 5.2.2
Web Server: Apache/2.2.0 (Fedora)
Web Server to PHP interface: apache2handler
Version Elxis 2008.1 Stable rev2204 [ Nemesis ] 29-September-2008 21:16 GMT+2
Title: Re: SEO in 2008.1
Post by: datahell on October 06, 2008, 08:50:58
Thanks ks-net.
To make it clear:
You only need to set properly the RewriteBase, nothing else.
If you have more languages not listed in the htaccess file you also have to insert your extra language the way the others are written.
I will write a small how-to soon.
Title: Re: SEO in 2008.1
Post by: balisto on October 09, 2008, 22:13:01

Hi guys,

yeah, yeah, yeah... it took me 5 days but I finally found a solution that worked for me... I tried it with two different webhosting companies (1&1, USA and UDmedia, Germany) but as I described above, I couldn't make it work on both servers. What worked for me was the following solution:

Quote
RewriteBase /subfolder/

This is what you told me...

Quote
RewriteCond %{QUERY_STRING} !mylang=[armenian|bosnian|brazilian|creole|croatian|danish|english|french|german|greek|indonesian|italian|japanese|latvian|lithuanian|persian|russian|serbian|spanish|srpski|turkish|vietnamese]{2,}

RewriteRule ^([hy]{2})/(.*)$ index.php?mylang=armenian [QSA]
RewriteRule ^([bs]{2})/(.*)$ index.php?mylang=bosnian [QSA]
# RewriteRule ^([pt\-BR]{5})/(.*)$ index.php?mylang=brazilian [QSA]
RewriteRule ^([ht]{2})/(.*)$ index.php?mylang=creole [QSA]
RewriteRule ^(
{2})/(.*)$ index.php?mylang=croatian [QSA]
RewriteRule ^([da]{2})/(.*)$ index.php?mylang=danish [QSA]
RewriteRule ^([en]{2})/(.*)$ index.php?mylang=english [QSA]
RewriteRule ^([fr]{2})/(.*)$ index.php?mylang=french [QSA]
RewriteRule ^([de]{2})/(.*)$ index.php?mylang=german [QSA]
RewriteRule ^([el]{2})/(.*)$ index.php?mylang=greek [QSA]
RewriteRule ^([id]{2})/(.*)$ index.php?mylang=indonesian [QSA]
RewriteRule ^([it]{2})/(.*)$ index.php?mylang=italian [QSA]
RewriteRule ^([ja]{2})/(.*)$ index.php?mylang=japanese [QSA]
RewriteRule ^([lv]{2})/(.*)$ index.php?mylang=latvian [QSA]
RewriteRule ^([lt]{2})/(.*)$ index.php?mylang=lithuanian [QSA]
RewriteRule ^([fa]{2})/(.*)$ index.php?mylang=persian [QSA]
RewriteRule ^([ru]{2})/(.*)$ index.php?mylang=russian [QSA]
RewriteRule ^([sr]{2})/(.*)$ index.php?mylang=serbian [QSA]
RewriteRule ^([es]{2})/(.*)$ index.php?mylang=spanish [QSA]
# RewriteRule ^([sr\-Cyr]{6})/(.*)$ index.php?mylang=srpski [QSA]
RewriteRule ^(
{2})/(.*)$ index.php?mylang=turkish [QSA]
RewriteRule ^([vi]{2})/(.*)$ index.php?mylang=vietnamese [QSA]
I had to comment out the two red lines (@datahell: I don't know why, but they were producing the internal server error you have seen on my installation) - to make the language switch work correctly I also had to remove the opening slash of the rewrite-rule URL of each language I used, so:

Quote
RewriteRule ^([en]{2})/(.*)$ index.php?mylang=english [QSA]

instead of

Quote
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA]

I don't know if all those problems are due to a miss-configuration of both of my webhosters, but I thought it might help people having the same problem on hosted webspace.

Cheers,
Chris
Title: Re: SEO in 2008.1
Post by: Ivan Trebješanin on October 09, 2008, 22:57:39
Thank you for sharing your solution with others. It is very nice of you. :)

PS
The issue you were having sometimes come from some  W(L)AMP servers. It is also good to know.
Title: Re: SEO in 2008.1
Post by: datahell on October 09, 2008, 23:49:18
I know about this, I have done several checks on different servers. The brazilian and sprski languages are wrong as their iso codes have more than 2 characters (remove that languages from htaccess). Here htaccess needs a small modification especially for these 2 languages.

Also after QSA add the L (last) parameter in order to tell apache that if a match is founded this is the last rule and do not search the other rules.

Example:
RewriteRule ^([hy]{2})/(.*)$ index.php?mylang=armenian [QSA,L]
Do this for all rewrite rules.

We gather all user bug reports and we will release soon an updated version of Elxis 2008.1.
Title: Re: SEO in 2008.1
Post by: balisto on October 10, 2008, 00:20:34
Great, thanks! I'm happy that I found out that I'm not THAT stupid  ;D This problem was driving me nuts...