Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PURL

Status
Not open for further replies.

Swi

Programmer
Feb 4, 2002
1,963
US
Does anyone have any sample code on how to set up IIS to handle a friendly PURL? Also, a suggestion for hosts that support this would be great as well.

The original thread was: thread333-1701555

Thanks.



Swi
 
how to set up IIS to handle a friendly PURL?

You can't.

If the URL(s) do not exist on the server IIS WILL respond with a 404 status code then you can use my "smart 404"
Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Ok, so IIS will provide a 404. The link provided looks like it is just replacing one URL with another.

So the easiest way would be to:

1. Trap the 404
2. Parse the friendly part of the URL
3. Redirect to an ASP file that does a database lookup on the PURL part of the URL and build the personalized web page

Ex. - test.com/swiler

Will return a 404 as page does not exist
Break of swiler
Redirect to asp page passing swiler as a querystring

Swi
 
The link provided looks like it is just replacing one URL with another.

Yes, it works just as an alias does in Apache URL rewriting (mod_alias rather than mod_rewrite)

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top