我經歷了許多資源在這裏和其他地方在網絡,但似乎無法使它的工作。 我在主目錄中有codeigniter應用程序。 Sym鏈接craeated在/ var/www/html中。 下面的鏈接工作正常。符號鏈接Codeigniter應用程序 - 從URL刪除index.php
http://mydomain.net/dms/index.php/welcome
但是沒有的index.php,我想下面的鏈接工作
http://mydomain.net/dms/welcome
代碼點火器2.1.1目錄:
dms
application
system
index.php
.htaccess
的config.php
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";
routes.php文件
$route['default_controller'] = "welcome";
配置文件httpd.conf
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
Alias /dms/ "/var/www/html/dms/"
<Directory "/var/www/html/dms">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
符號鏈接
ls -l /var/www/html
dms -> /home/user1/dms
.htaccess文件:
RewriteEngine On
# enable symbolic links
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+) index.php [L]
我試圖保持.htaccess文件在CI文件夾文件夾中的/ home /用戶1/DMS,後來在/ var/www/html等 兩個沒有工作。 我收到錯誤(HTTP錯誤日誌)
"File does not exist: /var/www/html/dms/welcome"
請幫助。
.htaccess文件是由基督教Giupponi下面我在評論中提到矯正工作給予。 AllowOverride在服務器級別的所有 不是必需的,但在特定的目錄級別是必須的。謝謝 – user2627240