douyan6742 2015-03-30 11:09
浏览 44

CodeIgniter在我的localhost上不能在服务器上运行

I have created a profile page for my organization staff. Each staff profile information can be seen when his/her email typed. For example:

http://localhost/people/zkanoca

will show my information. By the way it works on my local computer.

I have decided to take a test my application. Then I have uploaded all the files and changed the database access information.

To see how it works I typed:

http://people.example.com/zkanoca

I got 404 error. So I notified that it is a mod_rewrite issue. Then I re-typed the url as:

http://people.example.com/index.php/zkanoca

Now I am getting error:

Unable to locate the model you have specified: Header_model

Header_model is a class in header_model.php in models directory.

I have double checked the class names, file names, routes. There is no letter case problem. It works on local but not on the server. I have searched for a solution to my problem on Internet but none of them helped me. Also I am working with CodeIgniter 3.0rc3.

I am sure I forget to set something for remote server but could have not identified yet.

  • 写回答

1条回答 默认 最新

  • doutuo3899 2015-03-30 11:22
    关注

    Please try .htaccess with the rewrite rule

    Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

    评论

报告相同问题?

悬赏问题

  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计