1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wrong URL

Discussion in 'General Support & Questions' started by Eleazar, Feb 26, 2018.

  1. Eleazar

    Eleazar New Member

    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??
  2. JOkerOSX

    JOkerOSX New Member

    Try to reinstall..
  3. Eleazar

    Eleazar New Member

    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

    # 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/


    // 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'])), '\/') . '/');

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

    Lautaro Administrator Developer

    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.

    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:

Share This Page