Adding external app to Yii app

Hello, I would like to use external application install as a folder in my Yii application like.

mysite.com/qa

mysite is a Yii powered app and qa folder is a question2answer app that will run independently from Yii app. How can I tell Yii to omit qa folder from calling any controller?

Thank you

Phatthara

Do you need to tell it?

I am doing this successfully.

Do you face any issues? :)

@jacmoe

do you mind share your methods of doing that , i am interested in it ; :lol:

such as how access from yii app to another app(not with yii framework) :

someController:someAction(){

       <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?  <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif' class='bbc_emoticon' alt=':)' /> 

}

Haven’t really tried that, to be honest - accessing the embedded app from Yii. :)

But, it should be as simple as adding the app just like you would any vendor:

Yii::import.

How to call Yii from the external app?

Well…

The best way would be to expose an API - like REST.

Hi,

easiest way is to use a specific rule in your .htaccess file (as far as you turned on .htaccess)

example:




# your qa application (for example hosted in protected/qa)

RewriteRule ^qa/(.*)$ protected/qa/$1 [L,QSA]


# yii default rule

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]



Additionally you have to enable access to your independent app through .htaccess in protected/qa/.htaccess:




allow from all



best regards, robert