how can i run cakephp website without app name in url?
I have two app in cakephp2.1.3 vesion, one is admin and second is web, I want to run my website without my app name like without 'web', current website url is 'http://localhost/cakephp2.1.3/web/customers/index' but i need to access using 'http://localhost/cakephp2.1.3/customers/index'.
My current .htaccess is
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^admin/$ admin/webroot/ [L] RewriteRule ^$ web/webroot/ [L] RewriteRule (.*) web/webroot/$1 [L] </IfModule>
and i have just change outer index.php
When i try to access 'http://localhost/cakephp2.1.3/customers/index' it gives error
Error: Cakephp-2.1.3Controller could not be found. Error: Create the class Cakephp-2.1.3Controller below in file: web\Controller\Cakephp-2.1.3Controller.php
Assuming you cannot add a new domain and a new VirtualHost, look into apache's mod_alias that can map a url to a (different) filesystem location.
In your case you'll need something like this:
Alias /cakephp2.1.3 /cakephp2.1.3/web/