我在windows上编写了我的web应用程序,并将其推送到运行Ubuntu Linux的服务器上。这是我的.htaccess文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /SearchDatGifUbuntu/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /index.php
</IfModule>我在/etc/apache2/sites available/default目录下的文件如下:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>我在我的ubuntu服务器上的命令行中输入了sudo a2enmod rewrite,它显示mod_rewrite已经打开。
当我调试我的codeigniter应用程序时,错误似乎出现在CodeIgniter.php的第308行,即:
$CI = new $class();有人能告诉我发生了什么事吗?
发布于 2014-07-01 20:14:32
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 尝试这段.htaccess代码,然后重新启动您的apache
如果此链接不起作用,请尝试此链接
https://stackoverflow.com/questions/24504282
复制相似问题