• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access to sub directory problem

#1
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
Reply

#2
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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