I need help with url rewrite in asp.net

by vjboc
8 replies
Can someone help direct me with url rewrite asp.net for my website? In my admin section I have a check box to remap urls. But when I check it, the url's dont change. I also have a file named remap .config that has a list of files that look like the following
<urls>
<u o="office_supplies.*" n="d~c-office_supplies~b-24.aspx" />
<u o="office_basics.*" n="m~c-office-basics~b-212.aspx" />
<u o="calendars_organizers_planners.*" n="m~c-calendars-organizers-planners~b-12.aspx" />

I am not sure if there is anything else I need to do to get this to work.
I will start from scratch if someone could guide me step by step.

Thanks in advance for your help and time.
#aspnet #rewrite #url
  • Profile picture of the author firemanager
    Hello,

    Do you want to re-direct your page to something other url? Why dont you use checkbox's checked change function in asp.net?

    Thanks
    {{ DiscussionBoard.errors[6028592].message }}
    • Profile picture of the author vjboc
      Originally Posted by firemanager View Post

      Hello,

      Do you want to re-direct your page to something other url? Why dont you use checkbox's checked change function in asp.net?

      Thanks
      I dont want to redirect the whole domain. I just want to change dynamic urls from example: d~c-office_supplies~b-24.aspx to office_supplies.aspx

      If it was a couple of urls, it would not be a problem. I have 1000's of urls.
      I know there is a way of doing this. I just need someones help.
      {{ DiscussionBoard.errors[6028640].message }}
  • Profile picture of the author webcosmo
    its hard to tell without getting details.
    based on what you said, you have a module that need to be included on your web.config file. unless you have that, rewrite module wont fire. you may wanna check that.
    {{ DiscussionBoard.errors[6028977].message }}
    • Profile picture of the author vjboc
      Originally Posted by webcosmo View Post

      its hard to tell without getting details.
      based on what you said, you have a module that need to be included on your web.config file. unless you have that, rewrite module wont fire. you may wanna check that.
      What would that module be? There is a line of code that would get everything to work right?

      Is there a tutorial that anyone knows of that would guide me with this?
      {{ DiscussionBoard.errors[6029021].message }}
  • Profile picture of the author vjboc
    Can someone please help me with this? I have search the internet for this, there are alot of articles, but I don't understand how to implement it to my site.
    Help would be much appreciated.
    {{ DiscussionBoard.errors[6035425].message }}
  • Profile picture of the author vjboc
    I figured it out. When I check box in admin, it works. But the url stays the long string url.
    As follows "m~c-calendars-organizers-planners~b-12.aspx" But if I type in /calendars_organizers_planners.aspx the page also loads. How do I redirect the first url to the second url? But there are alot of urls. So I need some sort of code to work for all.

    Is there someone on this site that has a website that has thousands of urls that rewrote the ugly urls to readable urls? Please help.
    {{ DiscussionBoard.errors[6062797].message }}
  • Profile picture of the author Darknite7
    it should be fairly straight forward

    I'm assuming you have IIS 7

    (sorry I'm not allowed to post urls yet!)

    http learn (.) iis (.) net/page (.) aspx /469/using-rewrite-maps-in-url-rewrite-module/
    {{ DiscussionBoard.errors[6064764].message }}
    • Profile picture of the author vjboc
      Originally Posted by Darknite7 View Post

      it should be fairly straight forward

      I'm assuming you have IIS 7

      (sorry I'm not allowed to post urls yet!)

      http learn (.) iis (.) net/page (.) aspx /469/using-rewrite-maps-in-url-rewrite-module/
      Thanks, when I get a chance I will check this out.
      {{ DiscussionBoard.errors[6068622].message }}

Trending Topics