0

ショッピング カートの大規模な見直しの準備をしています。これにより、URL の構造が完全に変わります。これは Magento 1.7 用です。

URL の例は次のとおりです。 {domain}/item/sub-domain/sub-sub-domain-5-16-7-16-/8083770?plpver=98&categid=1027&prodid=8090&origin=keyword

そしてそれをにリダイレクトします{domain}/catalogsearch/result/?q=8083710

私のweb.configは次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
   <configuration>
    <system.webServer>
    <rewrite>
    <rules>
     <rule name="Magento Required" stopProcessing="false">
      <match url=".*" ignoreCase="false" />        <conditions>
                        <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions> <action type="Rewrite" url="index.php" />
    </rule>
                <rule name="Item Redirect" stopProcessing="true">
                    <match url="^item/([_\-a-zA-Z0-9]+)/([_\-a-zA-Z0-9]+)/([_\-a-zA-Z0-9]+)(\?.*)" />
                    <action type="Redirect" url="catalogsearch/result/?q={R:3}" appendQueryString="true" redirectType="Permanent" />
                    <conditions trackAllCaptures="true">
                    </conditions>
                </rule>
   </rules>
   </rewrite>
        <httpProtocol allowKeepAlive="false" />
        <caching enabled="false" />
        <urlCompression doDynamicCompression="true" />
  </system.webServer>
</configuration>

IIS GUI でサンプル URL が正規表現テストに合格したとしても、現在、リダイレクトは完全に無視されているようです。リダイレクトするより良い方法はありますか、それとも web.config に何か問題がありますか?

4

1 に答える 1