I am a newbie to cakephp.I had a previous cakephp project in root folder (Ex: www.example.com), now I have moved the files to a sub-folder 'folder1' (Ex: www.example.com/folder1). The site is working, but the images and the other sub paths are pointing to the old root link.
The folder1 .htaccess
<Limit GET POST>
#require valid-user
</Limit>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /folder1/
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
The folder1/app
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /folder1/
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
The folder1/app/webroot
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /folder1/
# Add trailing slash to urls
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{0,5})$
RewriteRule ^(.*)([^/])$ $1$2/ [R=301,L]
# Skip files and pass requests to cake
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Sorry for my bad English.
Please can anyone help me solve this issue.
Try this, goto app/config/core.php and make changes to this line,
Configure::write('App.fullBaseUrl', 'http://localhost/folder1');
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