من خلال PHP يمكن حذف index.php بهذا الشكل :
CODE
if(@strstr($_SERVER['REQUEST_URI'], "index.php"))
{
$_SERVER['REQUEST_URI'] = str_replace("index.php", "", $_SERVER['REQUEST_URI'] );
@header('HTTP/1.1 301 Moved Permanently');
@header("**: ".$_SERVER['REQUEST_URI']);
exit;
}
وإذا اردت ان تخصص لمنتدى PBB فيكون بهذا الشكل :
CODE
if(@strstr($PowerBB->_SERVER['REQUEST_URI'], "index.php"))
{
$PowerBB->_SERVER['REQUEST_URI'] = str_replace("index.php", "", $PowerBB->_SERVER['REQUEST_URI'] );
@header('HTTP/1.1 301 Moved Permanently');
@header("**: ".$PowerBB->_SERVER['REQUEST_URI']);
exit;
}
وتضعه في ملف includes/functions.class.php
اسفل هذا السطر :
CODE
$filename = explode('/',$filename);