Successful way to Rewriting URLs with ASP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Toni

    Successful way to Rewriting URLs with ASP?

    Does anyone have a recommended method of rewriting URLs with classic ASP?

    For example, if the browser shows the Friendly URL


    my app will show the following Content Page


    Right now, I'm experimenting with having my error 404 file do the redirect. But it's not
    as clean as I'd like - if I do a Server.Transfer or Server.Execute to the content page
    (the query strings are passed as session variables), the PATH_INFO shows that the URL is
    my error 404 file, which messes up my SmarterStats site statistics (BTW, "Smarter"St ats
    is actually pretty dumb).

    If my error 404 file performs a Response.Redire ct, the address bar sometimes shows the
    Content Page URL instead of the Friendly URL, defeating the purpose.

    Before deciding to spend the time, energy, and effort to move to ASP.NET 2.0, can anyone
    tell me if you've successfully implemented a rewriting URL method that makes you happy?
    Can the ASP.NET web.config file be made to work in this to successfully rewrite URLs?

    Thanks!!!

    Toni







  • daddywhite

    #2
    Re: Successful way to Rewriting URLs with ASP?



    OR



    I have sucessfully used both of these on my websites to do URL
    rewrites.

    For dynamic URLs you still need the ID in the URL somewhere eg:

    /product/45/my_product_name .htm ==== /prod_page.asp?I D=45

    unless of course you want to write rules for all the individual
    dynamic pages, which kinda defeates the point of a URL rewrite and
    dynamic website!

    Cheers.

    Comment

    • Toni

      #3
      Re: Successful way to Rewriting URLs with ASP?

      Looks nice. But because I'm on a shared server, I'd like to exhaust all other solutions
      before I install a server component.


      "daddywhite " wrote...

      >
      OR
      >

      >
      I have sucessfully used both of these on my websites to do URL
      rewrites.
      >
      For dynamic URLs you still need the ID in the URL somewhere eg:
      >
      /product/45/my_product_name .htm ==== /prod_page.asp?I D=45
      >
      unless of course you want to write rules for all the individual
      dynamic pages, which kinda defeates the point of a URL rewrite and
      dynamic website!
      >
      Cheers.

      Comment

      • Anthony Jones

        #4
        Re: Successful way to Rewriting URLs with ASP?

        "Toni" <Toni24@yahoo.c omwrote in message
        news:OyVsQzfPJH A.4712@TK2MSFTN GP06.phx.gbl...
        Looks nice. But because I'm on a shared server, I'd like to exhaust all
        other solutions
        before I install a server component.
        >
        Then consider other solutions exhausted. The best you can do when all
        you've got to play with is native ASP is the 404 hack.

        --
        Anthony Jones - MVP ASP/ASP.NET

        Comment

        Working...