i am having trouble deploying my zend framework application to mediatemple GS hosting.
I uploaded my application folder to ~/domains
and renamed it to mysite.net
folder.
Inside it, i created a symbolic link html
which points to public
directory in zend framework application folder. But the application is not working so far. Generally, mediatemple points a host
to ~/domains/host/html
path so my domain mysite.net
should point to ~/domains/mysite.net/html
.
Am i doing something wrong or is there more to this ? I am getting a 403 error when trying to access mysite.net
Update: Following rewrite rules make the base url http://mysite.net loadable but controllers dont work now. accessing http://mysite.net/controller sends page not found error :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]
Update: Its solved now. The trick is to add above .htaccess
file to the application root folder and also keep the original .htaccess
in public directory. Together the开发者_运维知识库y do wonders.
I've found the solution myself:
create a .htaccess
file in application root folder:
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]
Also keep the original .htaccess
in the /public
folder. I delete this at first which made things worse.
精彩评论