Wrong URL

Eleazar

New Member
Feb 26, 2018
5
0
1
29
Hello, I install this CMS in windows server 2012 and IIS, when I finish the instalation, all links are wrong! All links add C to link, example, my domain is mymuonline.com and in the webpage CMS create links mymuonlineC.com or http://mymuonlineC/inetpub/wwwroot/donation, why????, How I solve this??
 

Eleazar

New Member
Feb 26, 2018
5
0
1
29
Try to reinstall..
I already reinstalled it several times in several VPS with different OS windows server and it's the same problem in everything, I solved that problem by changing the path
Original

# Global Paths
define('HTTP_HOST', $_SERVER['HTTP_HOST']);
define('SERVER_PROTOCOL', (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://');
define('__ROOT_DIR__', str_replace('\\','/',dirname(dirname(__FILE__))).'/'); // /home/user/public_html/
define('__RELATIVE_ROOT__', str_ireplace(rtrim(str_replace('\\','/', realpath(str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']))), '/'), '', __ROOT_DIR__));// /
define('__BASE_URL__', SERVER_PROTOCOL.HTTP_HOST.__RELATIVE_ROOT__); // http(s)://www.mysite.com/

Fixed

// Global Paths
define('HTTP_HOST', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI');
define('SERVER_PROTOCOL', (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://');
define('__ROOT_DIR__', rtrim(str_replace('\\','/', dirname(__DIR__)), '/') . '/');
define('__RELATIVE_ROOT__', rtrim((access == 'admincp' ? dirname(dirname($_SERVER['SCRIPT_NAME'])) : dirname($_SERVER['SCRIPT_NAME'])), '\/') . '/');
define('__BASE_URL__', SERVER_PROTOCOL.HTTP_HOST.__RELATIVE_ROOT__);

But now all my links dont work and show 404 error, why?
example mymyserver.com/login = Error 404
 

Lautaro

Administrator
Developer
Dec 19, 2012
555
231
43
The issue with the paths it's because you're running the website on a windows host apparently. You can fix that by manually defining the paths in "webengine.php" file.

But now all my links dont work and show 404 error, why?
example mymyserver.com/login = Error 404
WebEngine uses Apache htaccess with mod_rewrite. If you do have that in your web server then you probably just don't have the htaccess override configured correctly in your apache configuration file.

Here's some information that will help you configure your apache htaccess:
https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride