My domain is
http://comox.ca and my current site is not loading any CSS, JS, or images. I originally installed MODX to a subfolder (/modx/) and have
RewriteEngine On
RewriteBase /modx/
in my .htaccess file which is in public_html/modx.
Everything was working fine, and then I had to change my DNS records. I have (in the A records)
comox.ca -> 67.231.17.10
www.comox.ca -> 67.231.17.10
which is pointing to the ip address given to me by my host (and what I was using for months for development) and seems to be working fine.
When I view my page source, all of the paths to CSS, JS, and image files have /modx/ in them because that's where they are stored on the server... For example,
<script src="/modx/assets/js/picturefill.js" async></script>
However, when I click on that link I get a 500 server error... But when I remove "modx/" it pulls up the correct file or image. Also, going to comox.ca/modx/assets gives a 500 server error, while comox.ca/assets brings up my asset tree. Even though the path to my assets folder is /home/username/public_html/modx/assets.
I did have an .htaccess file in my public_html folder that had
So that when people typed comox.ca they would be brought to comox.ca/modx and the site would show... But that was before the DNS change so I have commented it out for now.
What is going on?!
EDIT: I should mention that I am also unable to re-run the setup script... I put setup.zip in my public_html/modx folder, unzip it, and go to comox.ca/modx/setup which gives me a 404 and comox.ca/setup which gives me a 500 error.
EDIT: I will also include my core/config/config.inc.php paths:
if (!defined('MODX_CORE_PATH')) {
$modx_core_path= '/home/townofco/core/';
define('MODX_CORE_PATH', $modx_core_path);
}
if (!defined('MODX_PROCESSORS_PATH')) {
$modx_processors_path= '/home/townofco/core/model/modx/processors/';
define('MODX_PROCESSORS_PATH', $modx_processors_path);
}
if (!defined('MODX_CONNECTORS_PATH')) {
$modx_connectors_path= '/home/townofco/public_html/modx/connectors/';
$modx_connectors_url= '/modx/connectors/';
define('MODX_CONNECTORS_PATH', $modx_connectors_path);
define('MODX_CONNECTORS_URL', $modx_connectors_url);
}
if (!defined('MODX_MANAGER_PATH')) {
$modx_manager_path= '/home/townofco/public_html/modx/manager/';
$modx_manager_url= '/modx/manager/';
define('MODX_MANAGER_PATH', $modx_manager_path);
define('MODX_MANAGER_URL', $modx_manager_url);
}
if (!defined('MODX_BASE_PATH')) {
$modx_base_path= '/home/townofco/public_html/modx/';
$modx_base_url= '/modx/';
define('MODX_BASE_PATH', $modx_base_path);
define('MODX_BASE_URL', $modx_base_url);
}
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$isSecureRequest = false;
} else {
$isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
}
if (!defined('MODX_URL_SCHEME')) {
$url_scheme= $isSecureRequest ? 'https://' : 'http://';
define('MODX_URL_SCHEME', $url_scheme);
}
if (!defined('MODX_HTTP_HOST')) {
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$http_host='comox.ca';
define('MODX_HTTP_HOST', $http_host);
} else {
$http_host= array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : 'comox.ca';
if ($_SERVER['SERVER_PORT'] != 80) {
$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
}
$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
define('MODX_HTTP_HOST', $http_host);
}
}
if (!defined('MODX_SITE_URL')) {
$site_url= $url_scheme . $http_host . MODX_BASE_URL;
define('MODX_SITE_URL', $site_url);
}
if (!defined('MODX_ASSETS_PATH')) {
$modx_assets_path= '/home/townofco/public_html/modx/assets/';
$modx_assets_url= '/modx/assets/';
define('MODX_ASSETS_PATH', $modx_assets_path);
define('MODX_ASSETS_URL', $modx_assets_url);
}
[ed. note: matthewmeredith last edited this post 10 years, 3 months ago.]