2017-12-26 50 views
0

私は、アプレアサービスにwordpressをインストールし、ベースURLのリダイレクトを設定しようとしています。IIS URLリダイレクト

誰かが入ったときに「https://website.co/integration-resources」または「https://website.co/integration-resources/」誰かの種類https://website.co/integration-resources/add-to-cartは、それができるようにすべきであるとき、それは、https://website.co/integrationsしかし

にリダイレクトする必要があります。

<rule name="Configure Python" stopProcessing="true"> 
      <match url="(.*)" ignoreCase="false" /> 
      <conditions> 
      <add input="{REQUEST_URI}" pattern="^/static/.*" ignoreCase="true" negate="true" /> 
      <add input="{URL}" pattern="^/blog/.*" ignoreCase="true" negate="true" /> 
      <add input="{URL}" pattern="^/blog" ignoreCase="true" negate="true" /> 
      <add input="{URL}" pattern="^/integration-resources/.*" ignoreCase="true" negate="true" /> 
      </conditions> 
      <action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="true"/> 
     </rule> 
     <rule name="Configure Python 1" stopProcessing="true"> 
      <match url="(.*)" ignoreCase="false" /> 
      <conditions> 
      <add input="{URL}" pattern="^/integration-resources" ignoreCase="true" negate="true" /> 
      </conditions> 
      <action type="Rewrite" url="handler.fcgi/integrations" appendQueryString="true"/> 
     </rule> 
     </rules> 
+0

上記のリライトURLを実装しようとすると、問題が発生していますかルール? –

答えて

1

である場合にのみ一致します。

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

     <rewrite> 
      <rules> 
       <rule name="Redirect for the base URL" stopProcessing="true"> 
        <match url="^integration-resources[\/]?$" /> 
        <action type="Redirect" url="integrations" /> 
       </rule> 
      </rules> 
     </rewrite> 

    </system.webServer> 
</configuration> 
+0

ありがとう、アーロン、多くの助けた。 –

0

あなたはルール上

<rule name="integration-resources redirect" stopProcessing="true"> 
    <match url="^integration-resources/?$" ignoreCase="false" /> 
    <action type="Redirect" url="/integrations" appendQueryString="true"/> 
</rule> 

をこのルールを追加する必要があります正規表現^integration-resources/?$は、あなたのURLは、あなたがこのようにルールを追加する場合、これはうまくいくintegration-resourcesまたはintegration-resources/

関連する問題