php - Replace default_controller with different variable name in Codeigniter


In Codeigniter 2.2.0,

We are setting the default controller as$route['default_controller'] = "welcome";

I want to replacedefault_controller with some other variable name.

For example:$route['default_url'] = "welcome";

How can I change it? I think it is possible to replace the variable insidecore/Router.php .But Is that a correct approach?




Yes, @Alex is right... You should put your main controller name to $route['default_controller'] and redirect to specific url with conditions.

People are also looking for solutions to the problem: php - Parse symfony xml config


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.