Welcome Guest, Not a member yet? Register   Sign In
Problem with Routes

Hello friends i have a problem with routes "i think".

after remove the "index.php" from URL my router config is: 

PHP Code:
$route['default_controller'] = "links";
$route['translate_uri_dashes'] = FALSE;
$route['404_override'] = '';
$route['(:any)'] = 'links/index/$1'

Base url: 

$config['base_url'] = '';

the links controller have a function like this:

PHP Code:
public function index($head FALSE){
$head === FALSE){





so when i go to "" everything is going ok, for "[font=Monaco, Consolas, Courier, monospace]"[/font]
[font=Monaco, Consolas, Courier, monospace]i get a 404 not found, but when i manually put "[font=Monaco, Consolas, Courier, monospace]" its works.[/font][/font]

[font=Monaco, Consolas, Courier, monospace]i don't know where is the mistake, i tried split the controllers, i read the uri, url, routing documentation and look in stackoverflow and didn't find a clue.[/font]

[font=Monaco, Consolas, Courier, monospace]thanks and have a good day.[/font]


Maybe this will be helpful... ( https://www.codeigniter.com/userguide3/g...x-php-file )

After you set your .htaccess for codeigniter you should go to application/config file and find the line for

$config['index_page'] = 'index.php';
apprx line at 38. Remove the index.php and leave it blank : $config['index_page'] = '';

Good Luck.

Thanks demyr and php_rocks for replying me really appreciate, the problem was in the apache2 conf, figured out testing in another environment ( windows with xampp and worked). the CI config, routes and .htacces were good all the time.

Good luck, best regards

Theme © iAndrew 2016 - Forum software by © MyBB