Community Page
- www.ninjavspenguin.com/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Sorry to disappoint Tiff, but she's a brunette. The golden bits are just the underpainting. Can't wait to meet you in person, dearie. Cheers, Ninja
- IT IS AMAZING!!!!!!! I have never seen you do blond hair before and it looks awesome. I cant wait to see it in person!
- Hi Ray, Oh, ho ho, there ARE sparkles in there! Well, tiny iridescent flecks if you really want to get to it. I really liked my blush color, so I mixed it with clear gesso and dabbed it on there....
- Hi Jenni, Thanks so much for your kind words and tips!! It's always nice to hear from you. ^__^ A while back, I did buy myself a spiffy stay-wet palette, but I rarely use it. The thing is...
- she kinda looks like a vampire now .... just need to add some sparkles hehe
Jump to original thread »
So, the last few weeks, I started learning how to use the CakePHP framework. It’s been a little slow going, but it’s been pretty good. I’ve been developing on my local machine, which, for some reason, mod_rewrite just refuses to work. So, I decide
... Continue reading »
2 years ago
2 years ago
First: in the core cakephp directory
/cake
contents of .htaccess (unedited)
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
This tells cakePHP where you webroot is. If you have a basic install, then this shouldn't need to change. If you have a different directory for your apps, then you'll need to change the directories accordingly.
HTH.
-Penguin
2 years ago
1 year ago
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
I am a newbie to working with rewrite rules and I can't figure out how to path it properly.
1 year ago
these small modifications will save you lots of works!!
what they do are the following :
generate on-the-fly the ROOT-location and more!!!
i have tested it and i loved it myself :)
===========================
so what you need to do is, open the original /app/webroot/index.php
go to line 41 and replace the following lines with the original!
chdir("../../");
$root = getcwd();
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', $root.DS.'apps');
}
if (!defined('APP_DIR')) {
//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
define('APP_DIR', basename(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);
1 year ago
1 year ago
due to posting the ’ needs to be changed to ' (the single apos next to enter)
1 year ago
root/
root/app
root/app/webroot
not cake as you suggested above ;)
Thanks for the articel though it's helped me sort my problem out. I had to add RewriteBase / to each .htaccess and it all works great now :)
1 year ago
I moved the app files below the webroot and bake starting working again.
Any idea why?
1 year ago
I never actually got Bake to work, not even in the "normal" configuration. So, unfortunately, I can't be of any help.
Good luck with your projects!
-Penguin
1 year ago
1 year ago
That's some nice .htaccess ninja you got going. I'm glad you were able to find a solution that works for you :)
-Penguin
1 year ago
Awesome job.
11 months ago
Just a short note for CakePHP 1.2: If you want to solve the 500 Error with least changes possible just add the appropriate RewriteBase command to the app/webroot/.htaccess file. This is where any request lands somewhere during the "bootstrap process" anyway and it is easy to remove once an application goes live on a single domain.
Cheers