2

私のライブサーバーで動作しないindex.phpを削除します

それは私のローカルサーバーで動作します

以下のコードを試しました

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

ローカルのワンプサーバーでは機能しますが、ライブサーバーでは機能しません

Config.php の詳細

$config['base_url'] = 'http://ec2-174-129-44-226.compute-1.amazonaws.com/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['url_suffix'] = '';
$config['language'] = 'english';
4

3 に答える 3

0
<?xml version="1.0"?>
<configuration>
    <system.webServer> 
        <rewrite>
             <rules>
                 <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
于 2014-10-11T12:16:05.937 に答える