[eluser]Unknown[/eluser]
Greetings,
I'm rebuilding my site because of its unreadablity. Unfortunately I have a problem with routes or redirection.
At first my url was :
Code:
mysite.com/en/class/function/id
All codes were in a file in controllers directory. After some time, I understood that I wouldn't be able to remember which class had which function even though I wrote function names good.
So I decided to change class name with a folder and create file for each function.
When its like
Code:
mysite.com/en/folder/class/
There is no problem. But when an ID appears in url, it goes 404 like :
Code:
mysite.com/en/folder/class/id
I'm using index function for class call but still whenever I use id, it goes 404
Here is my .htaccess and some of my config file
Code:
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['enable_query_strings'] = FALSE;
$route['default_controller'] = "main";
$route['404_override'] = '';
$route['^(tr|en)/(.+)$'] = "$2";
$route['^(tr|en)$'] = $route['default_controller'];
----------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php
</IfModule>