I have downloaded a CakePHP project from an online server and need to make it work locally, to do some changes. I'm facing a problem similar to this one and have tried all possible solutions, with no luck.
Here's the situations:
I have mod_rewrite loaded (phpinfo()) together with the 3 .htaccess files, but still experience this problem.
Is there any known issue that I can explore to fix my site? Please redirect me to any guides or tutorials that you may feel relevant to my issue
Use RewriteBase directive in .htaccess.
e.g my dev space is on my localhost, is located in /home/ati/public_html/cakerbs, under a subdir in my userdir. The rewriteBase looks like as follows in the root of the cake:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /~ati/cakerbs
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
in the app directory .htacces:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /~ati/cakerbs
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
in the webroot directory:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~ati/cakerbs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
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