2015-09-25 63 views
1

我可以訪問http://myip/test/codeigniter/ intend http://myip/test/codeigniter/index.php/。好點CodeIgniter,短UL不起作用

但我不能訪問以下網址:

http://myip/test/codeigniter/welcome

http://myip/test/codeigniter/welcome/index

http://myip/test/codeigniter/index.php/welcome

http://myip/test/codeigniter/index.php/welcome/index

在的application/config/config.php文件

$config['index_page'] = ''; 

上的根目錄中的.htaccess

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 

<Files "index.php"> 
AcceptPathInfo On 
</Files> 

阿帕奇已經裝好了rewrite_module

我缺少什麼?

+0

添加'HTTP:// MYIP /測試/笨/''到$配置[ 'BASE_URL'] '也是。 – Tpojka

回答

0

更改此:

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

對此(注意?):

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