0
我目前正在使用CI。我需要一些幫助,從url中刪除index.php。 我嘗試了很多,不知道我的問題。我檢查瞭解決方案,但沒有幫助。CI URL格式化不起作用
我的.htaccess文件 - >
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
也改變
$config['index_page'] = 'index.php';
到:
$config['index_page'] = '';
並取得$config['base_url'] = 'my working url';
誰能幫助???
它不工作.. :( HTTP://localhost/CodeIgniter/index.php/test/testfn - >工作 的http:// localhost/CodeIgniter/test/testfn - > 404錯誤 – raavan
你是在Windows上(在本地)還是在你的網絡服務器上? –
我正在使用Ubuntu(本地) – raavan