Kohana 3.3 Routing with subfolders working on Windows but failed on Linux

61 Views Asked by At

I use kohana 3.3 (https://github.com/koseven/koseven) and have added this controllers:

applications/classes/Controller/Myfolder/Subfolder1
applications/classes/Controller/Myfolder/Subfolder2
applications/classes/Controller/Myfolder/Subfolder3

Each folder includes few controllers:

applications/classes/Controller/Myfolder/Subfolder1/Mycontroller1.php
applications/classes/Controller/Myfolder/Subfolder1/Mycontroller2.php
applications/classes/Controller/Myfolder/Subfolder1/Mycontroller3.php

In Windows this routing working fine, but on Linux thats not working and show 404:

Route::set('mycontroller', '<directory>/<controller>/<action>', array(
    'directory' => 'myfolder/subfolder1|myfolder/subfolder2|myfolder/subfolder3',
));

I must create a route for every controller like:

Route::set('myfolder/subfolder1', 'myfolder/subfolder1/<controller>/<action>')
->defaults(array(
    'directory' => 'Myfolder/Subfolder1',
));
Route::set('myfolder/subfolder2', 'myfolder/subfolder2/<controller>/<action>')
->defaults(array(
    'directory' => 'Myfolder/Subfolder2',
));

What is my mistake on Linux? And no, its not help to uppercase to this (thats not working on Windows and Linux, its must be lowercase):

Route::set('mycontroller', '<directory>/<controller>/<action>', array(
    'directory' => 'Myfolder/Subfolder1|Myfolder/Subfolder2|Myfolder/Subfolder3',
));
1

There are 1 best solutions below

0
bato3 On

Linux is case sensitive filesystem.

<direcotry> shouldn't contains /. Try use Cascading Filesystem and myfolder_subfolder1 or route filters to change case in direcotry