douza19870617 2016-01-29 06:55
浏览 208

404 - 找不到文件或目录。 您要查找的资源可能已被删除,名称已更改或暂时不可用

I have developed a project on codeigniter a php framework. It's working perfectly on my localhost where xampp is running. I have uploaded my whole project in the "wwwroot" folder and I can only get my opening page. But when I try to click on any link I get:

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable..

Here is my websiter link: Link : http://www.iimkondigre.in/ Problem Link : http://www.iimkondigre.in/course_archive

is my .htaccess file:


RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|fonts|prototype|robots\.txt|favicon\.ico|webservices)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]

  • 写回答

3条回答 默认 最新

  • drxv39706 2016-01-29 07:03
    关注

    Try It.

    Open config.php and do following replaces

    $config['index_page'] = "index.php"
    to
    $config['index_page'] = ""
    

    In some cases the default setting for uri_protocol does not work properly. Just replace

    $config['uri_protocol'] ="AUTO"
    
    by
    
    $config['uri_protocol'] = "REQUEST_URI"
    

    .HTACCESS

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>
    

    For Windows server
    Web.config file

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="MyRule"> 
                        <match url="^(.*)$" /> 
                        <conditions> 
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
                        </conditions> 
                        <action type="Rewrite" url="index.php/{R:1}" appendQueryString="false" /> 
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration> 
    
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向