Elxis CMS Forum

Support => Technical support => Topic started by: boghy on February 14, 2009, 06:44:51

Title: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: boghy on February 14, 2009, 06:44:51
I'm in the middle of testing the latest version of Elxis 2008.1 rev 2245 & all what i see looks great, but when i want to test the SEO Pro i run in 404 errors for any link.
Here is exactly what i did:

Apache:
I use name based vhost in apache 2.2 since I have multiple sites.
Quote
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@elxis.tld
    DocumentRoot "C:\www\test\elxis"
    ServerName elxis.tld
    AccessFileName .htcustompass
    ErrorLog "logs/elxis.tld.log"
    CustomLog "logs/elxis.tld.log" common
</VirtualHost>

<Directory "C:\www\test\elxis">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>


Renamed the htaccess.txt to .htaccess and i made sure that is in the "C:\www\test\elxis" where also are the rest of the Elxis 2008.1 files.
Attached to this post is what's inside the .htaccess.

Quote
#

RewriteEngine On

# The following line tells the web server where your Elxis installation is located in relation
# to the web server root directory. By default this is set to the www root folder ( RewriteBase / ).
# If you have installed Elxis in a sub-folder then set this path properly.
# For example if your elxis site is accessible via this URL http://www.mysite.com/elxis/
# You should set: RewriteBase /elxis/

RewriteBase /

#
# Language Handling
# You may remove the languages that you dont need or add other languages not listed here
# For the proper language names and the 2-letter iso code languages consider includes/Core/locale.php file
#

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

RewriteRule ^([hy]{2})/(.*)$ /index.php?mylang=armenian [QSA,L]
RewriteRule ^([bs]{2})/(.*)$ /index.php?mylang=bosnian [QSA,L]
#RewriteRule ^([pt\-BR]{5})/(.*)$ /index.php?mylang=brazilian [QSA,L]
RewriteRule ^([ht]{2})/(.*)$ /index.php?mylang=creole [QSA,L]
RewriteRule ^(
{2})/(.*)$ /index.php?mylang=croatian [QSA,L]
RewriteRule ^([da]{2})/(.*)$ /index.php?mylang=danish [QSA,L]
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([de]{2})/(.*)$ /index.php?mylang=german [QSA,L]
RewriteRule ^([el]{2})/(.*)$ /index.php?mylang=greek [QSA,L]
RewriteRule ^([he]{2})/(.*)$ /index.php?mylang=hebrew [QSA,L]
RewriteRule ^([id]{2})/(.*)$ /index.php?mylang=indonesian [QSA,L]
RewriteRule ^([it]{2})/(.*)$ /index.php?mylang=italian [QSA,L]
RewriteRule ^([ja]{2})/(.*)$ /index.php?mylang=japanese [QSA,L]
RewriteRule ^([lv]{2})/(.*)$ /index.php?mylang=latvian [QSA,L]
RewriteRule ^([lt]{2})/(.*)$ /index.php?mylang=lithuanian [QSA,L]
RewriteRule ^([fa]{2})/(.*)$ /index.php?mylang=persian [QSA,L]
RewriteRule ^([pl]{2})/(.*)$ /index.php?mylang=polish [QSA,L]
RewriteRule ^([ru]{2})/(.*)$ /index.php?mylang=russian [QSA,L]
RewriteRule ^(sr)/(.*)$ /index.php?mylang=serbian [QSA,L]
RewriteRule ^([es]{2})/(.*)$ /index.php?mylang=spanish [QSA,L]
RewriteRule ^(rs)/(.*)$ /index.php?mylang=srpski [QSA,L]
RewriteRule ^(
{2})/(.*)$ /index.php?mylang=turkish [QSA,L]
RewriteRule ^([vi]{2})/(.*)$ /index.php?mylang=vietnamese [QSA,L]

#
# Exclude Files and directories
#

RewriteRule ^(administrator/|bridges/|cache/|components/|editor/|help/|images/|includes/|language/|mambots/|media/|modules/|templates/|tmpr/) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

#
## Security rules. Comment them if they cause problems to your site
#

# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
# This rule is commented because it may cause some Elxis features to not work!
# RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]

All required folders and sub folders have the write permission.

After enabling the SEO Pro or SEO Basic option all links run into 404 error.
I have different script that run smooth all the settings as far as mod_rewrite but i have trouble gearing to work the elxis 2008.1 rev 2245.
This is also my first time using it and before i've post this I tried to find the answer around here, but without luck.
Can anyone please give me an idea where to look, since i've used all my resources?

Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: Farhad Sakhaei on February 14, 2009, 09:10:04
Are you using a windows server ?
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: datahell on February 14, 2009, 11:30:57
Do you see Elxis' error 404 page or apache's?
Have you enabled SEO PRO in elxis global configuration?
Have you loaded mod_rewrite in apache configuration?
Do you see mod_rewrite in phpinfo page?

This should exist in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so
and the module should exist in modules/ folder
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: boghy on February 14, 2009, 14:27:08
Are you using a windows server ?

I'm using Windows Server 2003 64bit with Apache 2.2 32bit, MySQL 5.0.67 64 bit & PHP 5.2.6
-----------------------------------------------------------------------------------------------------------
Quote
Do you see Elxis' error 404 page or apache's?
Apache 404 error
Quote
Have you enabled SEO PRO in elxis global configuration?
Yes, SEO Pro is enabled in Global Configuration
Quote
Have you loaded mod_rewrite in apache configuration?
I've checked is there
Quote
Do you see mod_rewrite in phpinfo page?
Yes, i see it.

P.S. I have other sites running on the same server with Apache 2.2 running with mod_rewrite and all works fine. Just elxis 2008.1 in mod_rewrite doesn't want to work in SEO Pro or Basic SEO mode.
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: boghy on February 16, 2009, 15:31:03
I would really appreciate some help guy's with my SEO PRO & Basic SEO 404 error. Is there anyone who can give me an idea of what else to check in order for this to work????
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: datahell on February 16, 2009, 20:30:33
Check if any of the following is not correct:

You site's absolute path is this: C:\www\test\elxis
You access it locally like this: http://elxis.tld and you have set the same URL in Elxis global configuration as the "live site" url.
You see the Elxis' front-page (http://elxis.tld) but when you click a link you get apache's 404 error page.
If you place a file in Elxis root folder you can access it like this: http://elxis.tld/myfile without 404 error
You have placed .htaccess in folder C:\www\test\elxis (Do you have any other htaccess files that might affects Elxis' one?)
You have set AllowOverride to "All"
You have enabled SEO PRO in Elxis global configuration.
You have mod_rewrite loaded.

If all of the above are correct then you should n't have a problem. I can not think of something else.
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: boghy on February 17, 2009, 05:44:13
Check if any of the following is not correct:

You site's absolute path is this: C:\www\test\elxis
You access it locally like this: http://elxis.tld and you have set the same URL in Elxis global configuration as the "live site" url.
You see the Elxis' front-page (http://elxis.tld) but when you click a link you get apache's 404 error page.
If you place a file in Elxis root folder you can access it like this: http://elxis.tld/myfile without 404 error
You have placed .htaccess in folder C:\www\test\elxis (Do you have any other htaccess files that might affects Elxis' one?) <<<---- BINGO ***
You have set AllowOverride to "All"
You have enabled SEO PRO in Elxis global configuration.
You have mod_rewrite loaded.

If all of the above are correct then you should n't have a problem. I can not think of something else.

Quote
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@elxis.tld
    DocumentRoot "C:\www\test\elxis"
    ServerName elxis.tld
    AccessFileName .htcustompass<<<--- BAD!!!!
    ErrorLog "logs/elxis.tld.log"
    CustomLog "logs/elxis.tld.log" common
</VirtualHost>

<Directory "C:\www\test\elxis">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Quote
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@elxis.tld
    DocumentRoot "C:\www\test\elxis"
    ServerName elxis.tld
#  AccessFileName .htcustompass<<<--- Good by commenting out the line or ERASE since Apache defaults to .htaccess 
    ErrorLog "logs/elxis.tld.log"
    CustomLog "logs/elxis.tld.log" common
</VirtualHost>

<Directory "C:\www\test\elxis">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
THX for tips Datahell.
Title: Re: Using Elxis 2008.1 rev 2245 SEO Pro on Win 64 bit with Apache 2.2 - 404 error
Post by: datahell on February 17, 2009, 07:40:13
That was a good test for both of us. I am happy that you solved this issue.