我甲肝我的路由規則如何在Yii框架中的路由規則中添加鏈接到靜態頁面?
'components'=>array(
/*'urlManager'=>array(
'urlFormat'=>'path',
),*/
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>'=>'<controller>/index',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>'
)
現在我想甲肝我的網頁內IMG鏈接到一個靜態網頁 如。
<a href="www.example.com"><img></a>
然而此鏈接重定向到
www.example.com/example.com
,我應該只在此鏈接重定向到靜態頁面
所以加什麼規則,我sitebase是www.example.com
所以Yii生成的任何鏈接永遠是
www.example.com/"something"
貴靜態網站同一個域喜歡你的Yii安裝或者是在不同的服務器/域(由大家推薦)? – Jurik
它是一樣的。 我的主要工作是在www.example.com/index.php 完成,並在www.example.com上有一個靜態主頁 這就是我想鏈接到 –
所以在'www .example.com/index.php「你和Yii以及'www.example.com'是一個靜態(html)主頁? – Jurik