setting up 301 redirects in nopcommerce

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hi, hope someone can help me out here.


I need to set up some redirects for a nop 2.8 website - the redirects are from a php website that uses idless urls - some of which refer to locations in folders that don't exist in the nopcommerce website

eg

http://thesite.com/attachments/delivery/
http://thesite.com/attachments/location/
http://thesite.com/attachments/item1


or

http://thesite.com/oldpage/



I need to add the following to web.config

<rewrite>
  <rules>
    <rule name="deliverypage">
      <match url="http://thesite.com/attachments/delivery/" />
        <action type="Redirect" redirectType="Permanent" url="http://thesite.com/DeliveryInfo" />
    </rule>
  </rules>
</rewrite>


but I can't get this to work even though rewrite module is enabled on the server.

Don't know where I'm going wrong ???


any help out there ?

thanks in advance.
9 years ago
hi, anyone offer a suggestion ?
9 years ago
have sent you a pm with some basic instructions for the redirect plugin - thanks for getting in touch.
9 years ago
Thanks Marc - yep, my mistake was including the domain name - the code should be :


<rewrite>
  <rules>
    <rule name="deliverypage">
      <match url="attachments/delivery/" />
        <action type="Redirect" redirectType="Permanent" url="http://thesite.com/deliveryinfo" />
    </rule>
  </rules>
</rewrite>

inside the   <system.webServer>  tags of web.config

====

notes :


1) <match url="
     should not start with a leading slash eg       <match url="/attachments/delivery/" />

2) use lowercase letters - just in case :)

3) urlrewrite module needs to be installed on the server - just ask your hosting supplier

4) <rule name="    must be different for each rule otherwise it will crash the application on startup

Marc has created the extension : https://www.nopcommerce.com/p/1044/301-page-redirect.aspx

this is well worth looking into if you are migrating from a different application - it's good to keep your seo page rankings from that site by pointing the old url to the equivalent page on your new site.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.