FAQ Detail
Question : How can i remove index.php from the url
Answer :
Please follow the instructions below
- Download the sample .htaccess file from here
- Upload it to ROOT directory
- Open it an modify "/directory" with the proper directory name
- If you installed the application on htdocs directly then replace "/directory" with "/"
- Now open ROOT/application/helpers/MY_url_helper.php
- change the following function
if ( ! function_exists('site_url')) { function site_url($uri = '',$lang='') { $CI =& get_instance(); $lang = ($lang=='')?$CI->uri->segment(1):$lang; if($lang=='') { $lang=default_lang(); } if($lang=='admin') $lang = 'en'; if($lang=='tv') $lang = 'en'; $final_url = $CI->config->site_url($lang.'/'.$uri); //$final_url = str_replace('http://','https://',$final_url); return $final_url; } }
--------------------- to (if you are using whizbiz or autocon) ---------------------if ( ! function_exists('site_url')) { function site_url($uri = '',$lang='') { $CI =& get_instance(); $lang = ($lang=='')?$CI->uri->segment(1):$lang; if($lang=='') { $lang=default_lang(); } if($lang=='admin') $lang = 'en'; if($lang=='tv') $lang = 'en'; $final_url = $CI->config->base_url($lang.'/'.$uri); //$final_url = str_replace('http://','https://',$final_url); return $final_url; } }
---------------------
or to (if you are using newspilot)
---------------------
if ( ! function_exists('site_url'))
{
function site_url($uri = '',$lang='')
{
$CI =& get_instance();
$final_url = $CI->config->base_url($uri);
//$final_url = str_replace('http://','https://',$final_url);
return $final_url;
}
}
- Now try to access your site without index.php in the url
- This will do the job for most of the cases. But different server need different htaccess and that depend on server configuration.
- If this method doen't work then you've to hire some freelancer or developers who will do that for you
- Remember DBCinfotech doesn't marketing this as a product feature. So everything you do will not be a responsibility of us.
- So take backups before you modify any file or database.