Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help! ASP.NET URL rewriting expertise needed!

  • 07-11-2008 6:23pm
    #1
    Registered Users, Registered Users 2 Posts: 87 ✭✭


    I'm working on an ASP.NET site at the moment that needs to direct people to the right page from a friendly URL...

    For example, the actual page address is this:
    http://www.thesite.com/themarket/page.aspx?id=x

    ... and people need to be able to access it from a URL like this:
    http://www.thesite.com/themarket/theproductname

    ... all the friendly page names are in the pages database, so I'll need to query that to find the appropriate page to direct them to. There are three different "themarket" pages, each with totally different designs.

    Now, I was going to do this with a custom 404 page, but whenever you enter a URL like the friendly one above, I get an XML error, saying "not well-formed". I assume the default.aspx page in the relevant "themarket" directory must be intercepting the request and trying to do something with it, but I don't know how to change this behaviour. I know there's supposed to be a better way to do it using code in the global.asax page, but I have no idea how to do it.

    This is my first proper ASP.NET site - I only recently graduated to .NET from Classic ASP, so most of these concepts are very new to me.

    Any help anyone can offer would be appreciated... I am completely flummoxed! :confused:


Comments

Advertisement