.htaccess 如何在000webhost中上载我的CodeIgniter项目
我创建了一个CodeIgniter项目,它在我的localhost中运行良好,我删除了该项目中的index.php,直接访问默认控制器/localhost/code2/。。。。一切正常 我想要的是,我想上传到000webhost中,我复制了所有ci文件并粘贴到000webhost中的public_html文件夹中,但它显示404错误 //.htaccess.htaccess 如何在000webhost中上载我的CodeIgniter项目,.htaccess,codeigniter,.htaccess,Codeigniter,我创建了一个CodeIgniter项目,它在我的localhost中运行良好,我删除了该项目中的index.php,直接访问默认控制器/localhost/code2/。。。。一切正常 我想要的是,我想上传到000webhost中,我复制了所有ci文件并粘贴到000webhost中的public_html文件夹中,但它显示404错误 //.htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
重新启动发动机
重写cond%{REQUEST_FILENAME}-f
重写cond%{REQUEST_FILENAME}-d
重写规则^(.*)$index.php?/$1[L]
ErrorDocument 404/index.php
请帮助我解决此问题…删除.htaccess中解决我问题的所有内容。并确保您的codeigniter文件应位于链接到域的文件夹中尝试更改此代码:
RewriteRule ^(.*)$ index.php?/$1 [L]
致:
RewriteRule ^(.*)$ ./index.php?/$1 [L]