Have a look here: http://bakery.cakephp.org/articles/view/cakephp-in-a-subdirectory-and-no-trailing-slash
On Wed, Mar 4, 2009 at 10:45 PM, gattu_marrudu <[email protected]> wrote: > > Hi, > I am developing a website under a provider (Bluehost) which allows me > to put my website root under a subfolder. To do this I had to add the > following .htaccess file in the public_html folder: > > RewriteEngine on > > RewriteCond %{HTTP_HOST} ^(www\.)?(mydomain.net)$ > RewriteCond %{REQUEST_URI} !^/lii/ > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(.*)$ /lii/$1 > > RewriteCond %{HTTP_HOST} ^(www\.)?(mydomain.net)$ > RewriteRule ^(/)?$ lii/index.php [L] > > > My public html files are in public_html/lii. The added 'lii/' never > shows up, as it should be. > > Everything looks fine until it comes to the routes. The router adds > 'lii/' to all the URLS when it translates them. > After debugging a little I got this: > //debug (Router::getPaths()); > Array > ( > [plugin] => > [controller] => > [action] => > [base] => /lii > [here] => /lii/somepage > [webroot] => /lii/ > ) > > //debug (Configure::read('App')); > Array > ( > [base] => > [baseUrl] => > [dir] => LII-4.0 > [webroot] => lii > [encoding] => UTF-8 > ) > > I tried to set Configure::write('App.base','/') in bootstrap, but it > won't work - it will strip all slashes from the URL! > Is there a way to set the Router base path? This might be the > solution... unless someone has another one. > > thanks > gm > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
