Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to remove index.php in codeigniter 3 route

step 1: create .htaccess file under root directory

step 2: on .htaccess file add this 

RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  
step 3: on config file change this  $config['index_page'] = 'index_page'; 
		to $config['index_page'] = ''; 

  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #codeigniter #route
ADD COMMENT
Topic
Name
8+6 =