OK here is root.php
[size="1"]//----------------------------------------------------------------------------
if ($request_type == 'NONSSL') {
define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
$g_relpath = HTTP_SERVER . DIR_WS_CATALOG;
$g_server = HTTP_SERVER;
} else {
define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
$g_relpath = HTTPS_SERVER . DIR_WS_CATALOG;
$g_server = HTTPS_SERVER;
}
//----------------------------------------------------------------------------
// Also note the $request_type has to be determined accurately between
// SSL and NON-SSL pages.
// See also documentation for details for this line:
// $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
//----------------------------------------------------------------------------
*/
//----------------------------------------------------------------------------
//-MS- Beginning of application_top.php section
//----------------------------------------------------------------------------
// start the timer for the page parse time log
define('PAGE_PARSE_START_TIME', microtime());
// set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
// check if register_globals is enabled.
// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.
if (function_exists('ini_get')) {
ini_get('register_globals') or exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.');
}
// Set the local configuration parameters - mainly for developers
if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');
// include server parameters
require('includes/configure.php');
if (strlen(DB_SERVER) < 1) {
if (is_dir('install')) {
header('Location: install/index.php');
}
}
// define the project version
define('PROJECT_VERSION', 'osCommerce 2.2-MS2');
// set the type of request (secure or not)
$request_type = ($_SERVER['SERVER_PORT'] == '443') ? 'SSL' : 'NONSSL';
// set php_self in the local scope
if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
if ($request_type == 'NONSSL') {
define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
} else {
define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
}
// include the list of project filenames
require(DIR_WS_INCLUDES . 'filenames.php');
// include the list of project database tables
require(DIR_WS_INCLUDES . 'database_tables.php');
// customization for the design layout
define('BOX_WIDTH', 173); // how wide the boxes should be in pixels (default: 125)
define('BOX_WIDTH_RIGHT', 151); // how wide the boxes should be in pixels (default: 125)
// include the database functions
require(DIR_WS_FUNCTIONS . 'database.php');
// make a connection to the database... now
tep_db_connect() or die('Unable to connect to database server!');
// set the application parameters
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
//----------------------------------------------------------------------------
//-MS- End of application_top.php section[/size]
this is .htaccess
[size="1"]# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
#
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
# php_value register_globals 1
#</IfModule>
#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On
# Next line must be changed to match your osCommerce folder - the relative path
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}
#-MS- SEO-G Added EOM[/size]
and this is configure.php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.xxx.org.ua'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'www.xxx.org.ua');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', 'public_html/');
define('DIR_FS_CATALOG', '/home/domains/xxx.org.ua/public_html/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'public_html/');