Links automatically redirect to homepage

I don’t know what happen to my website. most of the custom links automatically rediretc to homepage. Here is the corrupt link



[url]http://www.abc.com/csc/REAL_LOCATION/REAL_LOCATION/REAL_LOCATION/index.php?dispatch=pages.view&page_id=56[/url]



and i don’t know what is REAL_LOCATION . Please help:confused: :confused:

There was this part of the code:

```php

// Define real location

define(‘REAL_LOCATION’, (defined(‘HTTPS’) ? ‘https://’ : ‘http://’) . REAL_HOST . rtrim(fn_unified_path(dirname($_SERVER[‘SCRIPT_NAME’])), ‘/’));

define(‘REAL_URL’, (defined(‘HTTPS’) ? ‘https://’ : ‘http://’) . REAL_HOST . $_SERVER[‘REQUEST_URI’]);

```

in the “prepare.php” file located in the root CS-Cart directory in version 2.0.12 or earlier.



If your version is 2.0.12 or earlier, check whether this part of the code exists in the mentioned file.



If your version is 2.0.13 or higher, the problem probably means that not all the files were upgraded properly and requires the investigation on your server.