Which part did you not understand? Basically, i installed cakephp on a folder. Which is /cakewww/. Configured Apache <Directory /www/cakewww/> and set AllowOverride to All.
If you type it on a url: www.example.com/cakewww/. The page is saying 404. I edited /www/cakewww/.htaccess and add this RewriteBase /cakewww/ before RewriteEngine on. And the frontpage shows (working css). Now to check if controllers works, i visited www.example.com/cakewww/profile and it gives me Apache 400 error. This is just basic configuration and installation. Any ideas how to make cakephp work on a subfolder/apache alias? Louie On Dec 27, 2007 9:40 PM, Kjell Bublitz <[EMAIL PROTECTED]> wrote: > > I don't fully understand your problem, or what you are trying to show > everyone, but: > > Did you know that you can (and should) map the DocumentRoot to > "/cake_1x/[app]/webroot/"? > > That way, the libs are not public and the url rewriting via .htaccess > to /js, /img, /files and /css becomes obsolete, since those folders > are already at the top level then. > > In total this makes 2 things less to worry about: no open enviroment > and less url rewrites. > > Additonally it is a good practice to define the rewrite rules from the > /webroot/.htaccess file directly within the <Directory> section of > your httpd.ini (or vhost). This will speed things up a little, because > Apache does not need to find and parse the .htaccess file every time > something is requested. Once you have added the rewrite rules to the > apache config you can delete the .htaccess from /webroot/. > > PS: You an seperate the the 'cakephp' files and the 'app' completly. > just define CAKE_CORE_INCLUDE_PATH within the index.php (or > bootstrap.php). This allows you to share one cakephp-core with other > apps and keep the core out of '/var/www' completely. > > Best, > Kjell > > > > On Dec 27, 2007 7:30 AM, Louie Miranda <[EMAIL PROTECTED]> wrote: > > I been reading a lot of discussions on the cakephp mailing list. but, > could > > not figure out how to do this properly. Maybe this thread will be useful > > someday. > > I am familiar with the settings for Apache (httpd.conf) and PHP ( > php.ini), > > the only thing i am a bit clueless is the .htaccess file, but could > > understand how it works. > > > > 1. Created a apache alias called /cakewww/ on example.com ON httpd.ini. > Now > > it will look like example.com/cakewww/, when visited. > > 2. Configured Apache directory directive ON httpd.ini. -- AllowOverride > None > > to AllowOverride All > > 3. Extracted cake 1.x to /www/. It is now /www/cakephp_1.x/. > > 4. Renamed /www/cakephp_1.x/ to /www/cakewww/ > > 5. Visited example.com/cakewww/ > > > > * 404 Error - WHY? because cakephp is configured to be set on the main > > domain. Which on my example is example.com. Which resides on a folder > /www/. > > When visited, it will still visit example.com/ and not > example.com/cakewww/ > > . > > > > 6. So, edited /www/cakewww/.htaccess > > > > from --------------- > > > <IfModule mod_rewrite.c> > > > RewriteEngine on > > > RewriteRule ^$ app/webroot/ [L] > > > RewriteRule (.*) app/webroot/$1 [L] > > > </IfModule> > > > > > > > to --------------- (added RewriteBase /cakewww/) > > > <IfModule mod_rewrite.c> > > > RewriteEngine on > > > RewriteBase /cakewww/ > > > Redirect /google.html http://www.google.com > > > RewriteRule ^$ app/webroot/ [L] > > > RewriteRule (.*) app/webroot/$1 [L] > > > </IfModule> > > > > > > > 7. Visited example.com/cakewww/ -- shoot! It worked, even the CSS > > (stylesheet). > > 8. Tried to check if the whole cake thing works by visiting > > example.com/cakewww/testurl -- :( did not worked, 400 error on Apache. > > > > Now, i am lost. What's next? > > > > -- > > Louie Miranda ( [EMAIL PROTECTED]) > > http://www.axishift.com > > > > Security Is A Series Of Well-Defined Steps > > chmod -R 0 / ; and smile :) > > > > > > > > > -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---