
Originally Posted by
submantom
cheers, i'll ask the question of my host.
Just thought of another way you could do this with ASP if your host won't install isapirewrite.
1/ Set up a custom error page in IIS - every host offers this facility.
2/ Call it 404.asp
3/ make a url such as You.com/Products/Books
4/ As this url doesn't exist when a user requests it IIS will redirect to 404.asp
5/ on 404.asp you have some code which checks the 404 url for "/Products/"
6/ If found pull out the last bit "Books" in this case then do
<%server.transfer "/products.asp?cat=books" %>
It works because when IIS redirects to a custom 404 page the requested page is passed along in the query string. To pull out the url from the query string use code like this
Code:
<%
url = Request.ServerVariables("QUERY_STRING")
if len(url) > 0 then
url= right(url,len(url)-4)
end if
%>
Once you have the url you can parse it for whatever pattern you want. This is a bit of a hack but it should work - still look at isapi or asp.net first.
Bookmarks