.htaccess 未指定输入文件-Codeigniter
我是Codeigniter的新手,上传我的网站时,默认控件/视图显示良好。但是,当我试图打开其他页面时,它会出现以下错误 “未指定输入文件。” 。让我困惑的是,这在localhost中工作得很好 我在这个论坛上读到了关于更改htaccess文件的内容,但我不知道应该更改哪个htaccess文件以及如何更改 好心帮忙.htaccess 未指定输入文件-Codeigniter,.htaccess,codeigniter,.htaccess,Codeigniter,我是Codeigniter的新手,上传我的网站时,默认控件/视图显示良好。但是,当我试图打开其他页面时,它会出现以下错误 “未指定输入文件。” 。让我困惑的是,这在localhost中工作得很好 我在这个论坛上读到了关于更改htaccess文件的内容,但我不知道应该更改哪个htaccess文件以及如何更改 好心帮忙 提前感谢您可以更改根目录(系统、应用程序文件夹所在的位置)中的.htaccess,在任何文本编辑器中对其进行编辑,并将其另存为.htaccess .htaccess的示例如下 <
提前感谢您可以更改根目录(系统、应用程序文件夹所在的位置)中的
.htaccess
,在任何文本编辑器中对其进行编辑,并将其另存为.htaccess
.htaccess
的示例如下
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
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]
</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>
$config['base_url'] = 'http://yourdomainhere.com.uk.alien.org';
$config['index_page'] = ''; //make this blank
编辑
.htaccess文件必须为Unix LF only样式。如果您使用记事本或写字板并以CR/LF样式上载.htaccess文件,则无法正常工作。谢谢,我已尝试,但仍会显示相同的错误消息。我在戈达迪主持…请看这个。好的。。。我在其他网站托管服务器上测试过,效果很好。。。所以我想你们和爸爸在一起的问题是对的