• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Codeigniter web.config index.php rewrite inside a subdirectory

#1
from site_root/administration/application/config/config.php, any controller function shows 404 page not found. But if I place it i.e.
PHP Code:
[b]$config['index_page']='index.php';

it works fine.

I want to remove index.php from URL.

My question is,
How could I perform it through web.config ?
How could I perform it through .htaccess ?

I have asked this same question here but got no answer. I google it and found similar question here without any answer.

For your information, I am using CI 3
Reply

#2
try this .htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]

but now you gonna have to use the routes.php in application/config/routes to make sure your controller function work
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.