Connecting Tech Pros Worldwide Help | Site Map

Successful way to Rewriting URLs with ASP?

Toni
Guest
 
Posts: n/a
#1: Nov 3 '08
Does anyone have a recommended method of rewriting URLs with classic ASP?

For example, if the browser shows the Friendly URL
www.mydomain.com/blue_widget

my app will show the following Content Page
http://www.mydomain.com/item.asp?id=...e=d&color=blue

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"Stats
is actually pretty dumb).

If my error 404 file performs a Response.Redirect, 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
Guest
 
Posts: n/a
#2: Nov 3 '08

re: Successful way to Rewriting URLs with ASP?


http://www.isapirewrite.com/

OR

http://www.qwerksoft.com/products/iisrewrite/

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?ID=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.
Toni
Guest
 
Posts: n/a
#3: Nov 3 '08

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...
Quote:
http://www.isapirewrite.com/
>
OR
>
http://www.qwerksoft.com/products/iisrewrite/
>
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?ID=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.

Anthony Jones
Guest
 
Posts: n/a
#4: Nov 4 '08

re: Successful way to Rewriting URLs with ASP?


"Toni" <Toni24@yahoo.comwrote in message
news:OyVsQzfPJHA.4712@TK2MSFTNGP06.phx.gbl...
Quote:
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

Closed Thread


Similar ASP / Active Server Pages bytes