简体   繁体   English

我的codeigniter webapp有问题,它在我的本地主机上工作正常但在实时服务器上没有

[英]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.

相关问题 codeigniter sql 备份在本地服务器中工作正常,但在实时显示错误 - codeigniter sql backup works fine in local server but in live it shows error Codeigniter文件未在我的本地上载。在实时服务器中运行正常 - Codeigniter the files is not uploading in my local.Where as it is working fine in live server 我的本地计算机上出现MYsql错误。 - MYsql Error on my local machine.but it works fine on live Codeigniter本地主机重定向到实时服务器 - Codeigniter local host redirects to live server 笨。 Web应用程序在本地工作正常,但在实时服务器中它只加载主页 - Codeigniter. Web app works fine in local but in live server it only load the home page Mysql 查询在本地主机上工作正常,但在服务器上却不行 - Mysql queries works fine in local host but not in server Ajax在服务器中不起作用,但在本地主机中工作正常 - Ajax is not working in server but works fine in local host 发布按钮适用于本地服务器,但不适用于我的实时 web 服务器 - Publish button works on local server but not on my live web server getElementbyId 在服务器上返回 null 但在我的本地 wamp 上工作正常 - getElementbyId returns null on server but works fine on my local wamp 为什么print_r在实时服务器上不输出任何内容,但在本地主机上可以正常工作? - How come print_r does not output anything on my live server but works fine on my localhost?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM