I am using cakePhp 2.8.2. I am not sure where to start here. I have read about using the routes.php to be able to remove the /events/view/ part of the URL but not sure if this is as simple as it’s made out to be and also the .htaccess file.
The url string looks like this in my test project:
http://localhost:8888/rootfolder/events/view/united-kingdom/london/image/image-moved-to-bottom
and I am trying to do this:
http://localhost:8888/rootfolder/united-kingdom/london/image/image-moved-to-bottom
my .htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
My routes.php is like this:
if (!file_exists(APP.'Config'.DS.'database.php')) {
Router::connect('/*', array('plugin' => 'install' ,'controller' => 'install'));
}
Router::connect('/', array('controller' => 'events', 'action' => 'index'));
Router::connect('/about', array('plugin'=>null, 'controller' => 'pages', 'action' => 'display', 'about'));
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
Router::connect('/tests', array('controller' => 'tests', 'action' => 'index'));
Router::connect('/admin', array('admin' => true, 'controller' => 'settings', 'action' => 'dashboard'));
Router::connect('/feeds/*', array('controller' => 'feeds', 'action' => 'index'));
Router::connect('/lang/*', array('controller'=>'settings', 'action'=>'lang'));
CakePlugin::routes();
require CAKE . 'Config' . DS . 'routes.php';
Any help with this would be welcome, also if it’s not possible a confirmation it is not possible would also stop me from searching everywhere.
I should add that my ‘Events’ folder with’view.ctp’ is contained in the ‘View’ folder which is contained in the’app’ folder.