我在Netbeans 7.3.1中啓動了一個新的Codeigniter項目,並對我的文件結構進行了以下設置。Netbeans仍顯示根文件夾
我在項目屬性設置爲web根目錄指向public_html文本框內。我也有這個我的htaccess文件以及我已經從ci配置文件中刪除index.php。
我的問題是,當我去localhost/MyProject它仍然顯示腳文件夾,我不知道爲什麼。
有沒有人看到我在某個地方犯過的錯誤。
-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
我想你或Netbeans在項目設置階段會感到困惑,可能是在[運行配置](https://netbeans.org/kb/docs/php/project-setup.html#runConfiguration)設置的時候。它公開了它的項目目錄,這顯然不是應該發生的事情。 – fvu
這可能是因爲我第一次做了這個項目,然後開始移動並製作新的文件夾。你是否說我需要修復這個問題的索引文件輸入框? – user2576961
查看我鏈接到的運行配置頁面,它解釋了所有不同的選項。 – fvu