1

I had urls like this:

http://www.domain.com/index.php?route=product/product&path=someString&product_id=1111111

and I need to redirect al requests coming to index.php to this:

http://www.domain.com/p/1111111/

I am aware of apache's methodology via .htaccess, but how do I do it on IIS7 ?

0

You should be able to do this with the IIS 7 URL Rewrite module.

0

Try the following rule (I'm assuming it's an inbound rule):

<rewrite>
  <rules>
    <rule name="SFRule" stopProcessing="true">
      <match url="index\.php" />
      <action type="Redirect" 
              url="/p/{C:3}" 
              appendQueryString="false" 
              redirectType="Found" />
      <conditions>
        <add input="{QUERY_STRING}" 
             pattern="route=([_0-9a-z-\/]+)(?:&amp;|&amp;amp;)path=([A-Za-z]+)(?:&amp;|&amp;amp;)product_id=([0-9]+)" />
      </conditions>
    </rule>
  </rules>
</rewrite>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.