« Previous Next »

Thread: Url Rewrite problems

Last post 09-23-2009 10:14 AM by ScottBott78. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 09-22-2009, 12:18 PM

    Url Rewrite problems

    Sorry if this has been brought up in a previous thread but I'm struggling to get this to work for me at the moment. Here's my situation, I have a default.aspx page and on this page depending on the clicked link I am trying to display different topics. for example written as a querystring I have: default.aspx?topic=web and default.aspx?topic=print so ideally my friendly urls would be default/web.aspx and default/print.aspx. Going from the main page to each individual topic works perfectly and as expected...however...if I were on the default/web.aspx page and clicked the link to go to the /print.aspx page it adds an additional part to the url displaying default/default/print.aspx and obviously pops up with a horrible 404 error. Is there something I am missing, is there a workaround or is this just not going to work?
  • 09-22-2009, 1:12 PM In reply to

    Re: Url Rewrite problems

    ScottBott78:
    default.aspx?topic=web and default.aspx?topic=print so ideally my friendly urls would be default/web.aspx and default/print.aspx.

    I would think you would want to rewrite these as /web.aspx and /print.aspx, not writing a folder name of default.  That's likely also your problem, since you heep adding the /default, you end up with it twice in your second problem.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 09-23-2009, 10:14 AM In reply to

    Re: Url Rewrite problems

    Hi Jeff thanks for your response. your suggestion has indeed made sense to leave off the default path for the seperate topics on the default page and has worked perfectly, using a friendly url in the href works fine and using a querystring paramater is redirected through to the friendly url...fantastic! However the website consists of more than just the default page, for instance an Article page which I would also like to keep as seo friendly URLs. A sample path for these would be http://mysite.com/Articles.aspx?topic=multimedia&subtopic=emailmarketing&Article=1 the friendly url would look something like this: http://mysite.com/multimedia/emailmarketing/1 If I were now to use a querystring path in my tag to link to the page mentioned above from the default page or using the main navigation it is now not being rewritten or redirected or comes back as sort of a 50/50 mix. http://mysite.com/multimedia/Articles.aspx?topic=multimedia&subtopic=emailmarketing&Article=1 I dont really want to be left with the only option being build the whole site on the default page.
Page 1 of 1 (3 items)
Microsoft Communities