开发者

How to create zend framework project in a joomla subdirectory?

I have my joomla in http://project/ and now I want to have http://project/zf-project/ What httaccess should I use? And what 开发者_运维知识库changes in the code?


I have done this by

  1. Not changing the ZF .htaccess
  2. Putting my ZF public files inside /public/zf-project instead of /public this includes putting the ZF .htaccess file in /public/zf-project

Doing this worked fine for me without having to change anything else. Have you tried this?

EDIT

You could try adding to your Joomla .htaccess

 RewriteRule ^(zf-project) - [L]

After the line which reads

 RewriteEngine On


You can use the following .htaccess. It will work in subdirectories:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

Remember that you must apply baseUrl to your links, css files etc. This is necessary to include the sub-directory as a prefix to your urls.

Some of the classes in ZF already does that like the Url view helper.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜