Tuesday, February 12, 2013

Theme path problem when cakephp is in subdirectory.

Hi,

Does anyone also have a problem with the theme paths when Cakephp is put in a subdirectory?

My CakePHP site is placed in a subdirectory /test and I followed the official manual like this:

- http://book.cakephp.org/2.0/en/installation/advanced-installation.html :
// /app/webroot/index.php (partial, comments removed)    if (!defined('ROOT')) {      define('ROOT', DS . 'home' . DS . 'me');  }
ofcourse with 'me' as 'test' and 'home' as the name of my home directory.

And I also tried to change the .htaccess adding:
   RewriteBase    /test/

I tried all possible combinations of this (from updating only the /.htaccess to updating all 3 of them) and the site works with several of these combinations but it never finds the selected Theme resources (css, img, js) and it also doesn't find the plugin resources.

I tried bot put .htaccess files in the Themes folder and in the themes webroot but nothing helps. The only thing that works is to move the resources out of the themes webfoot into the theme directly. But than I get a file structure that I need to change over and over again when switching from test to production and it's not the 'Cake-way'.

Can anyone tell me what I'm doing wrong here?

Thanx in advance.

Luc





--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: