Access to sub directory problem |
I use CI 2.2.0. and php 5.5 in wamp server
I going to crazy with my project. on the default page for example http://localhost/myproject/ it work,. but when I click link with url http://localhost/myproject/about/ it not work it display the index page of wamp server. I have no solution to do it. canny one have idea with codeignitor version 2.2.0 thank you in davance
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'] = ''; |
Welcome Guest, Not a member yet? Register Sign In |