hello all,

I have a similar issue

I'm on a shared host

my setup is as follow

/cake
/httpdocs (dir accessible by browser)
/httpdocs/controllers
/httpdocs/models
/httpdocs/views
/httpdocs/webroot

the .htaccess file in httpdocs

<IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule     ^$      webroot/        [L]
        RewriteRule     (.*) webroot/$1 [L]
 </IfModule>

and in webroot

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

in my webroot/index.php

nothing changes from basic installation :

        if (!defined('ROOT')) {
                //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS
LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
                //You should also use the DS define to seperate your directories
                define('ROOT', dirname(dirname(dirname(__FILE__))));
        }
        if (!defined('APP_DIR')) {
                //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
                define('APP_DIR', basename(dirname(dirname(__FILE__))));
        }

/**
 * This only needs to be changed if the cake installed libs are
located
 * outside of the distributed directory structure.
 */
        if (!defined('CAKE_CORE_INCLUDE_PATH')) {
                //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE
CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
                //You should also use the DS define to seperate your directories
                define('CAKE_CORE_INCLUDE_PATH', ROOT);
        }



only my links are like :

/controller/action

and they appear in the address bar as

webroot/controller/action

which actually causes issues with my auth system

everything is fine if I just type a /controller/action url in the
address bar
but html links cause problems

i am a little lost as to what I am doing wrong
I have read this thread and of course I don't want to touch the core

can anyone help ?

thanks in advance

thomas


On Jul 5, 5:22 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 7/5/07, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]> wrote:
>
> >      I'm not surprised... well, I have posted my environment, my
> > variables and my doubts. If you can let me know the reason for regexp,
> > or if you have installed in similar setup and how, that will be
> > helpful.
>
> I have my layout as follows:
>
> cake is in ~/src/cake
> app is in ~/src/<app name here>
>
> I have multiple apps running off of the same CakePHP core
>
> Now, I use Apache2 so here's a sample entry in my vhosts:
>
>     ServerName local.cakedevelopment
>     DocumentRoot /home/chartjes/src/cakedevelopment/webroot
>
>     <Directory /home/chartjes/src/cakedevelopment/cake/webroot>
>         Options Indexes FollowSymLinks MultiViews
>         AllowOverride All
>         Order allow,deny
>         allow from all
>     </Directory>
>
> Now, in my <app>/webroot/index.php all I've done is the following:
>
>     if (!defined('CAKE_CORE_INCLUDE_PATH')) {
>          //define ('CAKE_CORE_INCLUDE_PATH', 'FULL PATH TO DIRECTORY
> WHERE CAKE CORE IS INSTALLED. DO NOT ADD A TRAILING DIRECTORY
> SEPARATOR');
>          //You should also use the DS define to separate your directories
>          define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'cake');
>     }
>
> That's it.
>
> My apps work just fine, no need to hack dispatcher or any other part
> of Cake to get it to work.
>
> I say this all the time:  CakePHP has a set of rules and if you don't
> follow them, you shouldn't be surprised when things don't work.
>
> --
> Chris Hartjes
> Senior Developer
> Cake Development Corporation
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to