我在 Netbeans 7.3.1 中启动了一个新的 Codeigniter 项目,并为我的文件结构设置了以下内容。
我在项目属性中设置了 web 根目录,指向文本框内的 public_html。我的 htaccess 文件也有这个,并且我已经从 ci 配置文件中删除了 index.php。
我的问题是,当我转到 localhost/MyProject 时,它仍然显示 foot 文件夹,我不知道为什么。
有没有人看到我在某处犯了错误。
-root
-application
-system
-public_html
-assets
.htaccess
index.php
Options -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
#When your application folder isn't in the system folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php