[英]I have problems with my codeigniter webapp it works fine on my local host but not on live server
Can any one help me? 谁能帮我?
I code a web app in php with codeigniter it works well on my localhost but when I upload it on live server it loads only home page. 我使用codeigniter在php中编写一个Web应用程序,它在我的本地主机上运行良好但是当我在实时服务器上传它时它只加载主页。 For other pages it gives a error ''No input file specificed''
对于其他页面,它会显示错误“'没有指定输入文件'''
When I do google about it. 当我谷歌关于它。 There are many tricks like change .htaccess but no one works.
有许多技巧,如改变.htaccess,但没有人工作。
What should I do 我该怎么办
Check this It loads foodpark.tk 检查一下它加载foodpark.tk
But does not load Foodpark.tk/category/index And all the other pages 但是不加载Foodpark.tk/category/index和所有其他页面
this is my .htaccess 这是我的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
Options -Indexes
i also tried to put a question mark after index.php in .htaccess but it gives 404 error from hosting 我还尝试在.htaccess中的index.php之后添加一个问号,但它从主机中提供了404错误
Sorry for my poor english 抱歉我的英语不好
Try this in your .htaccess file 在.htaccess文件中尝试此操作
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
Try this. 尝试这个。
In your .htaccess file Change 在.htaccess文件中更改
RewriteRule ^(.*)$ index.php/$1 [L]
To 至
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
Try below code in .htaccess. 在.htaccess中尝试以下代码。 This is from my working project.
这来自我的工作项目。 Hope you are using godaddy server.
希望你使用的是godaddy服务器。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.