And I realise now I wouldn't have this problem if I was using a proper
production setup with the webroot set as the docroot, but this is a
shared server so everything is inside the docroot.

So would it be fair to summarise it like below:

Don't rename your 'app' folder if you want it to appear as the root
when using a production-style setup, (i.e. everything inside the
docroot). Only an app folder named 'app' can appear as the root
application in this kind of setup.

J



On Nov 18, 1:10 pm, acoustic_overdrive <[EMAIL PROTECTED]>
wrote:
> Hi Andy,
>
> Thanks for your detailed response. Very interesting, I didn't know it
> worked like that.
>
> The reason I wanted to use a different app directory name was because
> I have multiple apps on my dev machine and when I uploaded one site
> into production I thought I may as well leave its app directory with a
> custom name, rather than rename it back to 'app'.
>
> Maybe I'd better read up again on mod_rewrite because I assumed the
> root .htaccess would jump _all_ traffic to /app/webroot/index.php, and
> that's why I fiddled with that file to send it into the renamed app
> folder. But I can see that it doesn't work like that. If there's a
> subdirectory with a matching name it does actually find it rather than
> using that subdirectory name as a cake controller name.
>
> Interesting....
>
> J
>
> On Nov 18, 12:40 pm, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 18, 1:33 pm, acoustic_overdrive <[EMAIL PROTECTED]>
> > wrote:
>
> > > The example I gave was just a quick way of demonstrating. I know it
> > > works fine with only one app called 'app', but what if you do want
> > > more than one?
>
> > > I was just browsing the source for dispatcher::baseUrl() and see that
> > > it used to be aware of the value of APP_DIR but now assumes it to be
> > > 'app': <https://trac.cakephp.org/changeset?new=trunk%2Fcake%2F1.2.x.x
> > > %2Fcake%2Fdispatcher.php%407690&old=trunk%2Fcake%2F1.2.x.x%2Fcake
> > > %2Fdispatcher.php%404241>
>
> > You are still missing the point.
>
> > let's assume you have localhost pointing to /var/www
>
> > and you have
> > /var/www
> >    app
> >    app2
> >    app3
> >    cake
> >    vendors
> >    .htaccess <- untouched
> >    index.php <- untouched
>
> > assuming standard routes
>
> > localhost/ will point at
> >   app/pagescontroller/display/home
> > localhost/app2/ will point at
> >   app2/pagescontroller/display/home
> > localhost/app3/ will point at
> >   app3/pagescontroller/display/home
>
> > Each app is self contained and each app will generate links to its own
> > root.
>
> > AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to