中を見ることができるように、URLからsfWebRequest.class.phpをgetPathInfo()削除しました:$relativeUrlRoot
$pathInfo = $pathArray[$sf_path_info_key];
if ($relativeUrlRoot = $this->getRelativeUrlRoot())
{
$pathInfo = preg_replace('/^'.str_replace('/', '\\/', $relativeUrlRoot).'\//', '', $pathInfo);
}
$relativeUrlRootURLからコントローラー名を削除するこの関数からです。
public function getRelativeUrlRoot()
{
if (null === $this->relativeUrlRoot)
{
if (!($this->relativeUrlRoot = $this->getOption('relative_url_root')))
{
$this->relativeUrlRoot = preg_replace('#/[^/]+\.php5?$#', '', $this->getScriptName());
}
}
return $this->relativeUrlRoot;
}
したがって、myapp_dev.php/mainまたはを持っている場合index.php/mainは、常に。を取得し/mainます。
の前にフルパスが必要な場合/mainは、も呼び出す必要があります$this->request->getScriptName()。
注意してください、ドメインとパス情報の間のすべてgetScriptName()を返します。がある場合は、次を返します。http://exemple.com/somepath/app_dev.php/maingetScriptName()/somepath/app_dev.php