I'm trying to retrieve string as parameter using following URL scheme: www.myapp.com/[String]
Is there any way I can do this?
*Based on my research, Codeigniter doesn't accept string parameters unless I include the Controller's name in URL: www.myapp.com/[Controller Name]/[String] But this doesn't solve my problem :(
You're right, CI requires controller name at URI, but You can use default_controller.
At config/routes.php
add route rule $routes['(:any)']
= 'welcome/index';, remove index.php from Your URL (there're many tutorials and how-to for this), and at last use
uriclass at Your
index()method of
welcome` controller:
function index(){
var_dump($this->uri->uri_string());
}