Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: How do I create a url rewrite?

  1. #1
    youngerjedi is offline Junior Member
    Join Date
    Jan 2010
    Posts
    2

    Default How do I create a url rewrite?

    After adding a whole bunch of products into a category page, aspdotnetstorefront has created a page numbering system so not I have

    domainname . com / categorypage . aspx ? pagenum=1

    and

    domainname . com / categorypage . aspx ? pagenum=2

    the problem now is I have duplicated pages with

    domainname . com / categorypage . aspx

    and pagenum=1

    I need to create a url re-write that is search engine friendly. Any know how I can do this on aspdotnetstorefront?

  2. #2
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    Take a look at the web.config file:

    Code:
    <rule url="/c-([0-9]*)-([\w-]*)\.aspx(?:\?(.*))?" rewrite="/showcategory.aspx?CategoryID=$1&amp;SEName=$2&amp;$3" />
    Just add the proper regex to the url attribute to handle the appended querystring and you should be all set.

  3. #3
    youngerjedi is offline Junior Member
    Join Date
    Jan 2010
    Posts
    2

    Default re: How do I create a url rewrite?

    Quote Originally Posted by AspDotNetStorefront - Dan View Post
    Take a look at the web.config file:

    Code:
    <rule url="/c-([0-9]*)-([\w-]*)\.aspx(?:\?(.*))?" rewrite="/showcategory.aspx?CategoryID=$1&amp;SEName=$2&amp;$3" />
    Just add the proper regex to the url attribute to handle the appended querystring and you should be all set.
    Hi Dan,

    Thank you so much for your reply. Yes:

    <rule url="/c-([0-9]*)-([\w-]*)\.aspx(?:\?(.*))?" rewrite="/showcategory.aspx?CategoryID=$1&amp;SEName=$2&amp; $3" />

    is exactly the code that exists in my web.config file but I still have:

    domainname . com / categorypage . aspx

    and

    domainname . com / categorypage . aspx ? pagenum=1

    Do I have a setting wrong?

    Is there a way to strip off only the " ? pagenum=1" from my url?

    Bear in mind, I want to keep the

    domainname . com / categorypage . aspx ? pagenum=2