Forum Moderators: open

Message Too Old, No Replies

IIS Config

question about fake directories

         

ajbattrick

1:23 pm on Dec 2, 2002 (gmt 0)

10+ Year Member



On Apache I can set up so that:

<Files image>
ForceType application/x-httpd-php
</Files>

means that I can do links like

[server.com...]

and then parse the url with PHP to grab the number. image is a script rather than a directory.

My question then is if this is possible with IIS. I can do the vbscript part, but its the IIS server config that I have little idea about.

korkus2000

1:25 pm on Dec 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think what you want is a virtual folder.

Try this.
[support.microsoft.com...]

Xoc

12:13 pm on Dec 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you need to create an ISAPI filter to pull this off in ASP.

In ASP.NET, you can configure a the web.config file to accomplish the same task.

ajbattrick

1:08 pm on Dec 3, 2002 (gmt 0)

10+ Year Member



korkus that doesn't really help, but Xoc perhaps you're onto something. I don't know if my host supports them though, and not how to write one either. I don't suppose you know of an already pre-written one for this purpose?

Cheers

jarvster

5:28 pm on Dec 17, 2002 (gmt 0)

10+ Year Member



I know I'm a bit late but this is entirely possible on iis. The way to do it is to create a custom 404 error page in iis which will process the url string as your example and provide the information from the database or whatever.
By using a...
Response.Status = "200 ok"
..at the beginning of your code will mean that the client (browser,spider etc) will recognise your url as valid and think it exists.

So you can very easily create many,many pages from your database content, like this...

www.domain.com/category/sub-catagory/product_id.htm

Xoc

10:49 pm on Dec 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are right--a 404 handler will let you do this.

Giacomo

8:06 pm on Dec 18, 2002 (gmt 0)

10+ Year Member Top Contributors Of The Month



Right! Who needs ISAPI filters when you can do wonders with a 404.asp page, clever URL parsing and a few Server.Execute's? ;)