WebEngine's 6th Anniversary

On December 19th, 2018 we will be celebrating 6 years of WebEngine CMS!
The event is here!

Wrong URL

#3
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
#4
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
 
Top