If I understand correctly, you can access your application from:
# http://example.com/cakephp/* # normally served from html/cakephp/
... but instead you want URLs to display like this:
# http://example.com/* # normally served from html/
The simplest option would be to move all the files and folders inside the cakephp
directory up one level, as it's intended to work "out of the box", so the directory structure was like this:
# html/.htaccess <- this file would then ...
# html/app
# html/app/.htaccess
# html/app/webroot <- ... rewrite requests to here
# html/app/webroot/.htaccess
# html/cake
If you wish to keep the cakephp
containing directory, then you will need to add your own .htaccess
file to the html/
directory to tell Apache of your intentions. The structure would be like this:
# html/.htaccess <- your .htaccess file goes here
# html/cakephp/.htaccess <- it should look similar to this one
# html/cakephp/app
# html/cakephp/app/.htaccess
# html/cakephp/app/webroot <- you need to rewrite requests to here
# html/cakephp/app/webroot/.htaccess
# html/cakephp/cake
The contents of which can be copied from the first CakePHP .htaccess file (as noted above) and altered slightly to produce the result you are after. Something like this:
RewriteEngine on
RewriteRule ^$ cakephp/app/webroot/ [L] # rewrites requests to example.com/
RewriteRule (.*) cakephp/app/webroot/$1 [L] # rewrites requests to example.com/*