all. This time I try cakephp, but I have got "URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting". I could know this is apache and .htaccess issues such as /etc/apache2/sites-avaliable/default and each directory .htaccess.
My development environment...
My process is followed...
1)/etc/apache2/httpd.conf
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
2)enabling mod_rewrite
sudo a2enmod rewrite
sudo service apache2 reload
3)editing /etc/apache2/sites-avaliable/default (AllOverride None to AllOverride All)
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
prompt: sudo service apache2 reload
4)editing or checking each .htaccess file ->cake root directory
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
->app root directory
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
->webroot directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
This issue is solved, thank you.
I had this problem as well. Turns out the .htaccess file was not getting copied alongside the cakePHP source. This is a common issue when using the cp command or not having hidden files visible in a file browser, unless you copy the top-level directory.
Doing a direct copy of the file to my project folder fixed it for me without having to mess with my apache settings.
cp ~/git/cakePHP/.htaccess ~/project/folder/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With