2011-06-01 61 views
1

我無法部署我的zend框架應用程序來中介GS託管。在mediatemple中部署zend框架應用程序GS

我將我的應用程序文件夾上傳到~/domains,並將其更名爲mysite.net文件夾。 在裏面,我創建了一個符號鏈接html,它指向在zend框架應用程序文件夾中的public目錄。但該應用程序目前無法運行。通常,中介指向host~/domains/host/html路徑,因此我的域名mysite.net應該指向~/domains/mysite.net/html。 我做錯了什麼,或者有更多這樣的?試圖訪問mysite.net當我得到一個403錯誤


更新:以下重寫規則使基本URL http://mysite.net加載但控制器不工作現在。訪問http://mysite.net/controller發送找不到網頁錯誤:S

SetEnv APPLICATION_ENV development 

RewriteEngine On 
RewriteRule ^\.htaccess$ - [F] 
RewriteCond %{REQUEST_URI} ="" 
RewriteRule ^.*$ /public/index.php [NC,L] 
RewriteCond %{REQUEST_URI} !^/public/.*$ 
RewriteRule ^(.*)$ /public/$1 
RewriteCond %{REQUEST_FILENAME} -f 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^public/.*$ /public/index.php [NC,L] 

更新:現在它的解決。訣竅是將.htaccess以上的文件添加到應用程序根文件夾中,並將原始文件.htaccess保存在公共目錄中。他們一起創造奇蹟。

+0

在此處找到了解決方法http://www.ttech.it/en/article/2010/03/zend-framework-all-projects-files-on-document-root/ – anp 2011-06-01 14:59:33

回答

1

我已經找到了自己的解決方案:

創建.htaccess文件中的應用程序根目錄:

SetEnv APPLICATION_ENV development 

RewriteEngine On 
RewriteRule ^\.htaccess$ - [F] 
RewriteCond %{REQUEST_URI} ="" 
RewriteRule ^.*$ /public/index.php [NC,L] 
RewriteCond %{REQUEST_URI} !^/public/.*$ 
RewriteRule ^(.*)$ /public/$1 
RewriteCond %{REQUEST_FILENAME} -f 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^public/.*$ /public/index.php [NC,L] 

還保持原來的.htaccess/public文件夾中。我首先刪除這使事情變得更糟。