- Kodu bul:
Kod: Tümünü seç
//Removing www. as it effects SEO and updating Config
$wwwcheck = preg_match('/:\/\/www\./',$baseurl,$matches);
if(count($matches)>0)
{
$baseurl = preg_replace('/:\/\/www\./','://',$baseurl);
}
// işareti kullan.(aşağıdaki gibi)
Kod: Tümünü seç
//Removing www. as it effects SEO and updating Config
// $wwwcheck = preg_match('/:\/\/www\./',$baseurl,$matches);
// if(count($matches)>0)
// {
// $baseurl = preg_replace('/:\/\/www\./','://',$baseurl);
// }
Kodu bul:
Kod: Tümünü seç
function GetBaseUrl($more=false)
{
$serverURL = $this->GetServerUrl();
$scriptPath = NULL;
if ( isset($_SERVER['SCRIPT_NAME']) ) {
$scriptPath = $_SERVER['SCRIPT_NAME'];
$scriptPath = ( $scriptPath == '/' ) ? '' : dirname($scriptPath);
}
$base = basename(dirname($_SERVER['SCRIPT_NAME']));
Kod: Tümünü seç
function GetBaseUrl($more=false)
{
$serverURL = $this->GetServerUrl();
$scriptPath = NULL;
if ( isset($_SERVER['SCRIPT_NAME']) ) {
$scriptPath = $_SERVER['SCRIPT_NAME'];
$scriptPath = ( $scriptPath == '/' ) ? '' : dirname($scriptPath);
}
$base = basename(dirname($_SERVER['SCRIPT_NAME']));
$baseURL = $serverURL;
$baseURL = $baseURL;
return $baseURL;
Kod: Tümünü seç
//Redirects page to without www.
function redirectOrig()
{
$curpage = $this->GetCurrentUrl();
$newPage = preg_replace('/:\/\/www\./','://',$curpage);
if($curpage !=$newPage)
header("location:$newPage");
Kod: Tümünü seç
//Redirects page to without www.
function redirectOrig()
{
$curpage = $this->GetCurrentUrl();
$newPage = $curpage;
if($curpage !=$newPage)
header("location:$newPage");
4)if you want your links to be redirected to www even if the user types in browser your domain without www then put this code your .htaccess file:
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
http://www.kalvitinsaat.com
http://www.mardinhotel.com
http://www.mardinbutikoteller.com
http://www.mardinbutikotelleri.com
http://www.mardinboutiquehotels.com
http://www.mardinboutiquehotel.com
http://www.akanlojistik.com
http://www.medicanalife.us
http://www.medikalive.com
http://www.medical47.com
http://www.krebsvideo.com
http://www.drrena.com
http://www.gesundheitvideo.com
http://www.medicanadirectory.com
http://www.cancervideo.tv
http://www.cancervideos.tv
http://www.cancervideos.net
http://www.belawela.com
http://www.smallhotels.tv
http://www.mardintravel.com
http://www.hotelmardin.com
http://www.medicanatv.com
http://www.juzztv.com
http://www.medicalvideos.eu
http://www.boutiqueandsmallhotels.com
http://www.kal-vit.com
http://www.medicanalife.com
http://www.lifesyrup.com
http://www.medicanalife.org
http://www.medicanalife.net
http://www.serfinaz.com
http://www.mutlutonbekici.com
http://www.kucukvebutikoteller.com