【发布时间】:2013-10-21 08:38:05
【问题描述】:
我已经阅读了很多相同问题的主题,但我没有找到解决方案...请帮助我。我有一盏灯进入 ubuntu 服务器。我的文档根目录是 /home/utente/ 进入这个目录我有另一个带有 codeigniter Web 应用程序的目录 (turni)。 Web 应用程序可以在 url 中添加“index.php”,但我想消除它。我有这个配置:
config.php 进入codeigniter:
$config['index_page'] = '';
.htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
/etc/apache2/sites-available/默认:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/utente
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/utente/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
当我在 url 中打开一个没有 eh“index.php”的 Web 应用程序链接时,服务器出现此错误:在此服务器上找不到请求的 URL /turni/auth/login。
为什么???如果我把 index.php 像 /turni/index.php/auth/login 一样工作正常.... 感谢您的帮助,对不起我的英语:D
【问题讨论】:
标签: apache .htaccess codeigniter ubuntu