Welcome to WebmasterWorld Guest from 54.90.204.233

Forum Moderators: ocean10000

Message Too Old, No Replies

Classic ASP URL rewriting

     
5:10 am on Sep 8, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Apr 7, 2002
posts:339
votes: 0


Can anyone offer some advice on URL rewriting on IIS 6, the best way to go etc. Ideally I'd like a coded solution not an IIS plug in.

We specifically want to turn URLS like this

/articleID=3456

to

/A_Page_Name

where "page Name" is stored in the database as "A_Page_Name" already.

Does anyone know if this would be possible with just classic ASP code?

5:30 am on Sept 8, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 23, 2005
posts: 401
votes: 0


Hi indigojo,

you can do this with 404 rewriting without the ISAPI filter or similar.

You'll need to point your 404 page in IIS to a script eg rewrite.asp. Then in rewrite.asp do a database lookup on the requested url (articleID=3456), pull your content and redirect (maybe with a 301 header).

Please note I've only done this with php on IIS and not classic asp. However I think the theory should hold. Googling for IIS custom 404 redirect may provide some further advice.

HTH

Cheers

10:47 am on Sept 8, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 24, 2005
posts:965
votes: 0


I used to mess around with (mis)using the dynamic 404 pages, but eventually I switched over to ISAPI_Rewrite and never looked back. It's much quicker and easier to use and adapt as your needs change. If you only have one website, you can use the free version of ISAPI_Rewrite.
11:46 am on Sept 8, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Apr 7, 2002
posts:339
votes: 0


thanks pavlovapete, we will give this a go.
4:55 pm on Sept 8, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


ISAPI_rewrite is definitely the industry standard. We've been using it since 2001 and is lightning quick. We've only noticed a performance impact when load testing at about 360 requests per second(about 300 more per second than we get :)). But it was good to know it scales!
11:25 pm on Nov 6, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Mar 7, 2003
posts: 1085
votes: 10


great to see the product name mentioned here to solve an otherwise nasty problem.

- any concerns about security or other downsides when dealing with this product?

5:23 am on Nov 9, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


Security, no, haven't run into any security issues.

Downsides to it only really happen when using .NET and postbacks, but it's an easy fix once you got the code for it.

Support is really good on their forums, and it's easy to install and understand.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members