【问题标题】:codeigniter 2.2.0 with A3M not working properly at remote server带有 A3M 的 codeigniter 2.2.0 在远程服务器上无法正常工作
【发布时间】:2015-02-28 03:40:47
【问题描述】:

在我的新项目中,我正在使用 codeigniter 2.2.0 和 A3M 1.01 授权库,我在本地主机上检查过它工作正常,但是当我将它上传到远程服务器上时,主页已加载但登录不工作它显示以下错误(www.redzoon.com)

内部服务器错误

服务器遇到内部错误或配置错误,并且 无法完成您的请求。

请联系服务器管理员, cgiadmin@yourhostingaccount.com 并通知他们错误的时间 发生,以及您可能所做的任何可能导致 错误。

有关此错误的更多信息可能在服务器错误中可用 记录。

此外,在执行过程中遇到 500 Internal Server Error 错误 试图使用 ErrorDocument 来处理请求。”我联系了 服务器管理员他说应用程序有问题。 所以我认为 .htaccess 文件中可能有问题。这是我的 .htaccess 文件代码

   RewriteEngine on
   RewriteBase /CodeIgniter2.2_A3M/
   # Directs all EE web requests through the site index file
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ ./index.php/$1 [L]

   <IfModule !mod_rewrite.c>
       ErrorDocument 404 /index.php
    </IfModule>

请帮我看看我哪里做错了,有什么遗漏的地方

【问题讨论】:

标签: php .htaccess codeigniter mod-rewrite codeigniter-a3m


【解决方案1】:

我已经用谷歌搜索了大约三天,最后我通过更改 .htaccess 获得了一些线索。现在我没有收到 500 内部服务器错误,而是收到“没有指定输入文件”,然后我再次搜索了这个错误,我找到了一个链接 .htaccess problem: No input file specified 我在哪里解决了我的问题,这是 .htaccess 代码

DirectoryIndex index.php

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)

RewriteRule ^(.*)$ index.php?/$1 [L]

这对我有用。

【讨论】:

    猜你喜欢
    • 2019-01-25
    • 2017-12-09
    • 2017-06-02
    • 1970-01-01
    • 2012-08-02
    • 1970-01-01
    • 1970-01-01
    • 2011-05-17
    • 2016-05-05
    相关资源
    最近更新 更多