469,290 Members | 1,913 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Accessing an ASP as /script.asp/param


In order to facilitate search engine indexing, I'd like to be able to
access a script using something like this:

http://server/script.asp/param

where this would execute script.asp which could then retrieve the extra
data "param" using the PATH_INFO server variable. PHP has a feature
similar to this and I've heard that IIS can do the same thing but I'm not
quite sure how. I've already enabled PATH_INFO as detailed here:

http://support.microsoft.com/default...NoWebContent=1

However, when I try to access a URL like the above, I just get a 404
presumably because IIS is looking for a directory called script.asp. How
do I make it execute the script instead?

Thank you
Jul 19 '05 #1
3 2051
Is this actually a feature in PHP? Can you point me to the docs? Usually I
have seen this as a feature of Apache (via mod_rewrite).

With IIS, the only way I have seen is via an ISAPI filter that rewrites the
request. There are commercial versions available, and no doubt freeware
versions as well.

I believe there is a simple version available for IIS6 in the IIS 6 Resource
Kit tools:
http://www.microsoft.com/downloads/d...DisplayLang=en

Cheers
Ken

"Jedediah Smith" <je************@silencegreysREMOVE.com> wrote in message
news:op**************@news1.on.sympatico.ca...
:
: In order to facilitate search engine indexing, I'd like to be able to
: access a script using something like this:
:
: http://server/script.asp/param
:
: where this would execute script.asp which could then retrieve the extra
: data "param" using the PATH_INFO server variable. PHP has a feature
: similar to this and I've heard that IIS can do the same thing but I'm not
: quite sure how. I've already enabled PATH_INFO as detailed here:
:
:
http://support.microsoft.com/default...NoWebContent=1
:
: However, when I try to access a URL like the above, I just get a 404
: presumably because IIS is looking for a directory called script.asp. How
: do I make it execute the script instead?
:
: Thank you
Jul 19 '05 #2

Well, it's part of the CGI specification that you should be able to use
paths like this without any special modules or filters:

http://hoohoo.ncsa.uiuc.edu/cgi/env.html

This is the only purpose of the PATH_INFO variable so why would IIS
support it at all if it didn't work? I've heard conflicting reports about
this. On this page

http://bugs.php.net/bug.php?id=7782

a fellow claims that IIS does not support it. However, here:

http://www.phpbuilder.com/mail/php-w...00071/0106.php

someone says that he has it working (dated May 2000). This page on
Microsoft's site also implies that it works with a hotfix:

http://support.microsoft.com/default...NoWebContent=1

but it's an IIS4 hotfix. I can only assume the fix is integrated with IIS5.

Unfortunately, my hosting provider will not let me install ISAPI filters
so I have to get it working this way somehow.

On Tue, 4 Nov 2003 22:05:05 +1100, Ken Schaefer
<ke*******@THISadOpenStatic.com> wrote:
Is this actually a feature in PHP? Can you point me to the docs? Usually
I
have seen this as a feature of Apache (via mod_rewrite).

With IIS, the only way I have seen is via an ISAPI filter that rewrites
the
request. There are commercial versions available, and no doubt freeware
versions as well.

I believe there is a simple version available for IIS6 in the IIS 6
Resource
Kit tools:
http://www.microsoft.com/downloads/d...DisplayLang=en

Cheers
Ken

"Jedediah Smith" <je************@silencegreysREMOVE.com> wrote in message
news:op**************@news1.on.sympatico.ca...
:
: In order to facilitate search engine indexing, I'd like to be able to
: access a script using something like this:
:
: http://server/script.asp/param
:
: where this would execute script.asp which could then retrieve the extra
: data "param" using the PATH_INFO server variable. PHP has a feature
: similar to this and I've heard that IIS can do the same thing but I'm
not
: quite sure how. I've already enabled PATH_INFO as detailed here:
:
:
http://support.microsoft.com/default...NoWebContent=1
:
: However, when I try to access a URL like the above, I just get a 404
: presumably because IIS is looking for a directory called script.asp.
How
: do I make it execute the script instead?
:
: Thank you


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 19 '05 #3
I think this is because ASP is not implemented as a CGI. It's implemented as
an API (ISAPI) filter.

Many server-side technologies are now implemented via APIs that are exposed
via the webserver software in question, because performance is usually
higher. However, you can also run somethings as CGIs, which offer lower
performance, but generally are more portable, since they are not tied to an
API exposed by the webserver software itself. So, you can have PHP
implemented as a CGI (php.exe) or as an IIS ISAPI filter. I would assume
that you can do whatever.server.com/php.exe/param/ but you can't do
whatever.server.com/something.php/param where .php is being intepreted via
the PHP ISAPI filter (as opposed to the PHP .exe)

(This is from long-lost memories from my programming studies at Uni, so it
may be somewhat incorrect as I'm not sure I remember it all correctly).

Cheers
Ken

"Jedediah Smith" <je************@silencegreysREMOVE.com> wrote in message
news:op**************@news1.on.sympatico.ca...
:
: Well, it's part of the CGI specification that you should be able to use
: paths like this without any special modules or filters:
:
: http://hoohoo.ncsa.uiuc.edu/cgi/env.html
:
: This is the only purpose of the PATH_INFO variable so why would IIS
: support it at all if it didn't work? I've heard conflicting reports about
: this. On this page
:
: http://bugs.php.net/bug.php?id=7782
:
: a fellow claims that IIS does not support it. However, here:
:
: http://www.phpbuilder.com/mail/php-w...00071/0106.php
:
: someone says that he has it working (dated May 2000). This page on
: Microsoft's site also implies that it works with a hotfix:
:
:
http://support.microsoft.com/default...NoWebContent=1
:
: but it's an IIS4 hotfix. I can only assume the fix is integrated with
IIS5.
:
: Unfortunately, my hosting provider will not let me install ISAPI filters
: so I have to get it working this way somehow.
:
: On Tue, 4 Nov 2003 22:05:05 +1100, Ken Schaefer
: <ke*******@THISadOpenStatic.com> wrote:
:
: > Is this actually a feature in PHP? Can you point me to the docs? Usually
: > I
: > have seen this as a feature of Apache (via mod_rewrite).
: >
: > With IIS, the only way I have seen is via an ISAPI filter that rewrites
: > the
: > request. There are commercial versions available, and no doubt freeware
: > versions as well.
: >
: > I believe there is a simple version available for IIS6 in the IIS 6
: > Resource
: > Kit tools:
: >
http://www.microsoft.com/downloads/d...DisplayLang=en
: >
: > Cheers
: > Ken
: >
: > "Jedediah Smith" <je************@silencegreysREMOVE.com> wrote in
message
: > news:op**************@news1.on.sympatico.ca...
: > :
: > : In order to facilitate search engine indexing, I'd like to be able to
: > : access a script using something like this:
: > :
: > : http://server/script.asp/param
: > :
: > : where this would execute script.asp which could then retrieve the
extra
: > : data "param" using the PATH_INFO server variable. PHP has a feature
: > : similar to this and I've heard that IIS can do the same thing but I'm
: > not
: > : quite sure how. I've already enabled PATH_INFO as detailed here:
: > :
: > :
: >
http://support.microsoft.com/default...NoWebContent=1
: > :
: > : However, when I try to access a URL like the above, I just get a 404
: > : presumably because IIS is looking for a directory called script.asp.
: > How
: > : do I make it execute the script instead?
: > :
: > : Thank you
: >
: >
:
:
:
: --
: Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rob | last post: by
2 posts views Thread by ksr | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.