Working directories upon transition to new app

Hi all.

I’m transitioning from an old app to a new Yii 2 Advanced app.

I need to have some directories to act as they do it in the past, procedural mode with includes, no ORM, etc…

Let me explain:

Yii2 is responding under frontend/web or backend/web directory. Apache’s Virtual Hosts manage that successfully. But when I try to respond a request based on (example) http://localhost.com/newdir I cannot make it work, it gives a 404.

I tried playing with .htaccess redirects, rewrites, and apache prefix virtual hosts configuration without success.

I want to integrate the use of five directories while I work and upload the new app, substituting the old directories for controllers and so.

New app now serves most of the app, but it should live with the old directories until final deployment.

Any clue or strategy will be appreciated.

Thanks in advance.

Again, answering my own question, here is how I did it:

I just write two alias configuration, and a directory directive.

So, now in the VHost config:





Alias /newdir/ "/Applications/mampstack-5.4.36-0/apps/newdir/"

Alias /newdir "/Applications/mampstack-5.4.36-0/apps/newdir/"



And for the directory containing the code:





# For alias subdirectories

<Directory "/Applications/mampstack-5.4.36-0/apps/newdir">  

    ....



Hope it helps anybody…