2017-06-13 14 views
0

メインのルートフォルダの「blog」というサブディレクトリにWordPressがインストールされていて、web.config URLがルートの.php拡張子で詳細に書き換えられますフォルダ。私はまた、標準のwordpress web.configファイルを 'blog'サブディレクトリに持っています。IISのphp拡張URLの書き換えルールとサブディレクトリ内のwordpressが矛盾します

ログインページがログイン時に何らかの理由で自分自身をリフレッシュしていることを除いて、すべてが動作します。これにより、競合が発生していると思われます。

ルートweb.configヘルプの「blog」ディレクトリを省略しますか?私は試しましたが、私が受け取るのは500エラーです。ここで

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<rewrite> 
    <rules> 
     <rule name="wordpress" patternSyntax="Wildcard"> 
      <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"/> 
     </rule></rules> 
</rewrite> 
</system.webServer> 
</configuration> 

すべてのアイデアは大歓迎... ...

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<rewrite> 
<rules> 
<rule name="Redirect .php extension" stopProcessing="false"> 
    <match url="^(.*).php$" ignoreCase="true" /> 
<conditions logicalGrouping="MatchAny"> 
    <add input="{URL}" pattern="(.*).php$" ignoreCase="false" /> 
</conditions> 
    <action type="Redirect" url="{R:1}" redirectType="Permanent" /> 
</rule> 
<rule name="hide .php extension" stopProcessing="true"> 
    <match url="^(.*)$" ignoreCase="true" /> 
<conditions> 
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
    <add input="{REQUEST_FILENAME}.php" matchType="IsFile" /> 
    </conditions> 
    <action type="Rewrite" url="{R:0}.php" /> 
</rule> 
</rules> 
</rewrite> 
</system.webServer> 
</configuration> 

ルートweb.configファイルであり、ここでブログ/ web.configファイルです。

答えて

0

私はようやくこの問題の解決策を見つけました。

は、私はこの問題を克服 <rule name="block" stopProcessing="true"> <match url="^blog/wp-login.php$" /> <action type="None" /> </rule>

...ブログのフォルダを省略する新しいルールを追加しました。この解決策は次の場所に見つかりました... How to exclude a directory with IIS URL rewriting

関連する問題