Here I am with a question that might have been heard many times but still I could not find a perfect solution for that. My question is that : How to hide the module name , controller name and method name from URL in php codeigniter. Yes I have googled a lot and have seen many of the videos but did not reach to a success.
Below are the lines of code of different files:
<li><a href="<?php echo base_url('index.php/user/UserController/homeIndex');?>">Home</a></li>
In above code there is a ul li menu bar in which when I click on Home it should redirect to the homeIndex method of UserController and user module. UserController is the Controller name homeIndex is the mentho in UserController and user is the module. I am following HMVC structure here.
Currently when I click on home it creates below url http://localhost/KWeds_svn/kweds_hmvc/index.php/user/UserController/homeIndex
Below is my .htacces file code that I am currently using
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
Below is the base_url defined in config.php
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";
$config['index_page'] = 'index.php';
My expected output for the url is only http://localhost/KWeds_svn/kweds_hmvc/
Please let me know how can I hide module name ,controller name and method name.