عرض مشاركة واحدة
عضو نشيط جدا
تاريخ التسجيل: Jan 2008-
#6 (permalink)  

بأمكانك اضافته كاول سطر بلصفحة بلطريقة هاي

كود PHP:
<?php
 
if(preg_match("/[index.php]$/",$_SERVER[REQUEST_URI]))
{

$url="http://".$_SERVER[HTTP_HOST].preg_replace("/(index.php)$/","",$_SERVER[REQUEST_URI]);
$sapi=php_sapi_name();
    if (
PHP_VERSION >= '4.3.0')
    {
        
header("Location: $url"0301);
    }
    else if (
$sapi == 'cgi' OR $sapi == 'cgi-fcgi')
    {
        
header("Location: $url");
        
// Call the status header after Location so we are sure to wipe out the 302 header sent by PHP
        
header('Status: 301 Moved Permanently');
    }
    else
    {
        
header("Location: $url");
        
header('HTTP/1.1 301 Moved Permanently');
    }
}
?>






samehzone متواجد حالياً   قديم 07-04-2008, 04:58 PM
رد مع اقتباس