I don't think this functionality has changed recently. If you search
this list you will find many instances of this - it has behaved this
way for as long as I can remember.
To fix, you need to add
RewriteBase /reviews
to your /app/webroot/.htaccess file (just after the RewriteEngine On
line). You may also need to add
define ('WEBROOT_DIR', 'reviews');
to your /app/webroot/index.php. This was certainly the case when I
last used aliases (admittedly some time ago now).
On Oct 23, 11:13 pm, Kick The Donkey <[EMAIL PROTECTED]> wrote:
> I'm running into a bit of a problem with the latest stable version.
> It seems like Cake is assuming it's "installed" to work from
> webroot.
>
> I have the cake directory installed in /opt. So, under /opt/cake I
> have:
>
> /opt/cake/app
> /opt/cake/cake
> /opt/cake/docs
> /opt/cake/vendors
> /opt/cake/index.php
>
> So, I run bake (from /opt/cake): php ./cake/scripts/bake.php -project
> reviews
>
> That generates the skeleton. In my apache config file, I setup an
> alias:
>
> Alias /reviews/ "/opt/cake/reviews/webroot/"
> <Directory "/opt/cake/reviews/webroot">
> Options Indexes FollowSymLinks
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> When I restart apache,http://localhost/reviews/gives me the startup
> page, but with no css. when I look at the generated source, I have
> this for the css line:
>
> <link rel="stylesheet" type="text/css" href="/css/cake.generic.css" />
>
> Which, of course, should be:
>
> <link rel="stylesheet" type="text/css" href="/reviews/css/
> cake.generic.css" />
>
> I went ahead and proceeded with baking my models, views, and
> controllers, and I had similar results with all the action links going
> to "/controller/action" as opposed to "/reviews/controller/action".
>
> How can I get cake to use the relative path instead of thinking it's
> in the webroot? Or did I bake this wrong?
>
> Thanks,
>
> KTD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---