Welcome Guest, Not a member yet? Register   Sign In
Reserve addresses routes
#1

(This post was last modified: 06-26-2018, 03:14 AM by Nome.)

I'm using code modules, and when i need a module in another module, use "use modules\name\controller-or-model" ...

When need to specify a path for each of them, i create a separate Routes.php inside each module...

But how do specify the default module? When i write on the site https: //example.com/about-how-i-spent-the-summer

I indicate in the application/Config/Routes.php
Code:
$routes->setDefaultController('Article');
$routes->setDefaultMethod('getArticle/$1');

When it does not find any of the existing modules, it accesses the default module. But this does not happen.
 
How to set the default value correctly? 
Or specify a list of reserved addresses? 
Or do you specify the path in the controller in cases and if the article is not found?

Same in the subject of routes, i want to ask how to remove the index.php when sending a form?
Example: 
Code:
echo form_open('controller/method',array('...'));
...

http: //example.com/index.php/controller/method
In other cases, there is no index.php (because it is removed by the .htaccess).

P.s

Also specified the default controller and method in the modules/default_module/config/Routes.php , but this, for some reason, did not work either...
Reply


Messages In This Thread
Reserve addresses routes - by Nome - 06-26-2018, 03:10 AM
RE: Reserve addresses routes - by InsiteFX - 06-26-2018, 04:52 AM
RE: Reserve addresses routes - by Nome - 06-26-2018, 12:47 PM
RE: Reserve addresses routes - by InsiteFX - 06-27-2018, 03:47 AM
RE: Reserve addresses routes - by Nome - 07-07-2018, 02:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB