Remove app/webroot from url
问题 I'm trying to remove app/webroot from the url in my CakePHP application using htaccess. We know it can be fixed just by pointing the vhost to the app/webroot folder, but for some reasons the developers over here prefer to fix this using htaccess. Anyone who knows or this is possible? 回答1: Setup your various .htaccess like this: .htaccess in DOCUMENT_ROOT: RewriteEngine on RewriteBase / RewriteRule (.*) app/webroot/$1 [L] .htaccess in DOCUMENT_ROOT/app RewriteEngine on RewriteBase /app/