codeigniter在本地但在Web服务器上工作正常.404错误

Kit*_*its 6 codeigniter

Codeigniter在本地服务器上运行正常但在Web服务器上运行不正常.

我用于XAMPP本地的开发.

我正在使用Parallels Plesk Panel 11.0.9 for Microsoft Windows.

未加载codeigniter的404错误页面.Url是服务器的loadind 404错误页面.我删除 .htacces 了根目录的 所有重写规则并包含在内index.php.它仍然没有用.

搜索了很多,但找不到正确的解决方案

codeigniter文件夹的目录(站点,应用程序,系统)

mysite/httpdocs/demo/test/
Run Code Online (Sandbox Code Playgroud)

mysite/httpdocs/demo/test/application/config/config.php中的基本URL

$config['base_url'] = 'http://mysite/httpdocs/demo/test/site/';
Run Code Online (Sandbox Code Playgroud)

mysite/httpdocs/demo/test/application/.htaccess中

Deny from all
Run Code Online (Sandbox Code Playgroud)

在index.php中设置的集合(mysite/httpdocs/demo/test/site/index.php)

switch (dirname(__FILE__)) {
        case 'http://mysite/httpdocs/demo/test/site':
            define('ENVIRONMENT', 'development');
        break;

        default:
            define('ENVIRONMENT', 'production');
        break;
    }
          $system_path = '../system';
          $application_folder = '../application';
Run Code Online (Sandbox Code Playgroud)

mysite/httpdocs/demo/test/site/.htaccess中

               <IfModule mod_rewrite.c>
                           Options +FollowSymLinks
                           RewriteEngine on
                           RewriteCond %{REQUEST_FILENAME} !-f
                         RewriteCond %{REQUEST_FILENAME} !-d
                          RewriteRule ^(.*)$ index.php/$1 [L]
              </IfModule>
Run Code Online (Sandbox Code Playgroud)

mysite/httpdocs/demo/test/application/config/routes.php中

           $route['default_controller'] = "page";
           $route['404_override'] = 'page';
           $route['article/(:num)/(:any)'] = 'article/index/$1/$2';
Run Code Online (Sandbox Code Playgroud)

我正在给url mysite/demo/test/site它给出404错误页面的web服务器而不是codeigniter

我错在哪里?

Kit*_*its 11

我联系了我的主人.他们说php处理程序有问题.

除了这个IIS不读.htaccess文件,而不是我做一个文件web.config,并替换.htaccessmysite的/ httpdocs资料/演示/测试/网站/

web.config文件内容是

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<system.webServer>

    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>

    <rewrite>
    <rules>
        <rule name="RuleRemoveIndex" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true"/>
        </rule>
    </rules>
    </rewrite>

</system.webServer>

<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
</system.web>

</configuration>
Run Code Online (Sandbox Code Playgroud)

现在网站已经启动并运行.谢谢你的支持.