FAQ Detail

Question : How can i remove index.php from the url

Answer :

Please follow the instructions below

    1. Download the sample .htaccess file from here
    2. Upload it to ROOT directory
    3. Open it an modify "/directory" with the proper directory name
    4. If you installed the application on htdocs directly then replace "/directory" with "/"
    5. Now open ROOT/application/helpers/MY_url_helper.php
    6. 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;
			}
		} 
  1. Now try to access your site without index.php in the url
  2. This will do the job for most of the cases. But different server need different htaccess and that depend on server configuration.
  3. If this method doen't work then you've to hire some freelancer or developers who will do that for you
  4. Remember DBCinfotech doesn't marketing this as a product feature. So everything you do will not be a responsibility of us.
  5. So take backups before you modify any file or database.