I've installed cakePHP on a shared server where I can't set the Apache webroot, so it's current开发者_如何学Goly pointing to /public_html. In that folder I have /cake, /app, /vendors, etc. Everything works fine; the only problem is that rather than links to controllers/actions being www.mysite.com/controller/action, there is an addition /app/ in the URL, like this:
www.mysite.com/app/controller/action
I want to get rid of /app/ in my URL. Any suggestions? If you need anymore info (.htaccess files, etc.) let me know.
Thanks!
What goes in public_html is the webroot directory.
You should put cake outside public_html as well as the app directory. Then just edit webroot/index.php to the corresponding routes and you're done.
精彩评论