CakePHP MAMP mod_rewrite无法正常工作?
Been delving into PHP and the Cake framework recently and trying to set up a new project using Cake 2.4.7 with MAMP on my MacBook.
I want to use the DebugKit plugin, during installation it suggests my mod-rewrite is not configured correctly as none of the DebugKit's styling seems to be loading. I feel like I've tried everything that people are suggesting to get it working but nothing seems to do the trick.
Here is a list of all the things I have found on forums so far and tried, if anyone has anything else I can try I will be very grateful!
git clone https://github.com/cakephp/debug_kit.git
inapp/Plugin
directory which createddebug_kit
added/uncommented
CakePlugin::load('DebugKit');
inapp/Config/bootstrap.php
added
Configure::write('debug', 2);
inapp/Config/core.php
removed
?php echo $this->element('sql_dump'); ?>
fromapp/View/Layouts/default.ctp
-
added
.htaccess
in project root directory:<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule>
-
checked
.htaccess
in myapp
directory:<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule>
-
checked
.htaccess
in myapp/webroot
directory:<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule>
checked output of
echo phpinfo();
formod_rewrite
which was presentin
/Applications/MAMP/conf/apache/httpd.conf
replaced allAllowOverride None
changed toAllowOverride All
for<Directory>
directivescommented out
echo $this->Html->css(array('cake.generic.css'));
in case it was getting in the way
And still the debug kit toolbar looks like this:
dongxing7318
2014/04/18 14:24- mamp
- php
- 点赞
- 收藏
- 回答
1个回复
