Attention all users -
If your live site name in your joomla configuration is prefixed by www then your site may not accept Ajax requests without www. And vice versa.
So, in order to Ajax requests run properly, please add the following code in index.php file of your template
if your $mosConfig_live_site var does not have www:
| Code: |
$getHttpHost = $_SERVER['HTTP_HOST'];
if (stristr($getHttpHost,"www")) {
if (count($_GET) == 0 && count($_POST) == 0) {
header("Location: ".$mosConfig_live_site );
}
}
|
And if your $mosConfig_live_site var has www:
| Code: |
$getHttpHost = $_SERVER['HTTP_HOST'];
if (!stristr($getHttpHost,"www"«»)) {
if (count($_GET) == 0 && count($_POST) == 0) {
header("Location: ".$mosConfig_live_site );
}
}
|
Admin