.htacces and routes for codeigniter

 .htaccess for remove index.php page


RewriteEngine on

RewriteCond $1 !^(index\.php)

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?$1 [L]


routes for remove default controller 


$route['^(?!other|controller).*'] = 'welcome/$0';


prevent direct access of the page

defined('BASEPATH') OR exit('No direct script access allowed');


Post a Comment

0 Comments