2012-11-26 78 views
0

我已生成新聞司模塊管理,並添加基於模塊authentication.application虛擬主機上運行的模塊網址工作在本地主機,但不工作的服務器

www.localhost.com 

,並模塊在本地主機的工作正常網址

www.localhost.com/admin 

www.localhost.com/admin/default 

但是當我上載服務器模塊D通過URL訪問它給出錯誤404. 我也檢查過另一臺服務器上。 我的config/main.php作爲

'urlManager'=>array(
        'urlFormat'=>'path', 
        'showScriptName'=>false, 
        'rules'=>array(
          '<controller:\w+>/<id:\d+>'=>'<controller>/view', 
          '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', 
          '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', 
        ), 
      ), 

和.htaccess文件作爲

Options +FollowSymLinks 
IndexIgnore */* 
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . index.php 

請告訴我,我錯過了什麼。

回答

1

您可能需要重寫基本路徑。試試這個:

RewriteEngine On 
RewriteBase/
+0

並檢查mod_rewrite是否被加載。 –

相關問題