Welcome Guest, Not a member yet? Register   Sign In
Access to sub directory problem
#2

(This post was last modified: 02-05-2016, 03:12 AM by keulu.)

if http://localhost/myproject/index.php?about/ work it's because you need an htaccess with rewrite_mod enable if you use apache

with nginx, you need a particular rule

look on google "codeigniter apache/nginx conf"

file : .htaccess at the root of your vhost (myproject folder)
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]


and your CI config

$config['index_page'] = 'index.php';

will become

$config['index_page'] = '';
Reply


Messages In This Thread
Access to sub directory problem - by socheat1994 - 02-04-2016, 09:01 PM
RE: Access to sub directory problem - by keulu - 02-05-2016, 03:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB