if you want to correctly run OpenCart under IIS (frontend included) you need 2 small changes.
First open the config.php and admin/config.php files and add the following code:
Code: Select all
define('REWRITE_URLS', false);
Code: Select all
//remastered URLs out
if (!preg_match('/\/admin\/index.php/',$_SERVER['PHP_SELF'])) { // not admin area
$link=str_replace('controller=','',$link);
$link=str_replace('&','/',$link);
$link=str_replace('=','/',$link);
$link=str_replace('index.php?','',$link);
}
Code: Select all
//remastered URLs out
if (REWRITE_URLS && !preg_match('/\/admin\/index.php/',$_SERVER['PHP_SELF'])) { // not admin area
$link=str_replace('controller=','',$link);
$link=str_replace('&','/',$link);
$link=str_replace('=','/',$link);
$link=str_replace('index.php?','',$link);
}
If you want to move the OpenCart installation under an Apache web server, you can set the new REWRITE_URLS constant in the config.php file to true and get the original behavior.
Hope it helps.