p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   why not index.asp?id=1 can be www.myweb.com/?id=1 (http://p2p.wrox.com/showthread.php?t=17669)

BurhanKhan August 31st, 2004 06:21 AM

why not index.asp?id=1 can be www.myweb.com/?id=1
 
Hi

i have encounter a problem.

It is working properly:
www.myweb.com/index.asp?id=1

but it is not:
www.myweb.com/?id=1

how to do the second one. I also see in many websites that r using the second one line.

Thanks
Burhan




madhukp August 31st, 2004 07:15 AM

for this, you have to make index.asp as the first default document in the IIS settings.

Open IIS manager.
Rightclick virtual folder and select properties.
Click documents tab.
Add index.asp to default documents list if it is not already there.
Move index.asp up until it becomes the first default document.
save and restart www service.

BurhanKhan August 31st, 2004 08:11 AM

thanks madhukp.

Bur problem is that index.asp is already my default page.

when i open this:
localhost/myweb
then it open index.asp

but not doing this:
localhost/myweb/?id=1

what is mistake

thanks
Burhan


madhukp August 31st, 2004 08:55 AM

In the IIS settings, you can have more than one default page in a pre-defined order. For e.g. The default pages may be

default.htm
default.asp
index.htm
index.asp

in that order. Then it will first look for a page default.htm. If it is not available, it will look for default.asp. On the other hand, if it is available, it will show default.htm. Like that it will check for a max of 4 files. If none of above files are there in the folder and if the directory listing is not permitted, it will give a 403 error. (If directory listing is permitted, it will list all files of the directory).

The order of the files in the above list is important for your requirement. That is why I asked you to push index.asp to the top in the list.

[u]Otherwise, you can delete default.htm, default.asp and index.htm files from the folder. This may not be possible if you are using them for some purposes.</u>

Please follow the steps above fully. You may require the help of server admin incase you are using a remote server.

bmains August 31st, 2004 12:13 PM

Hey,

I didn't know you can do:

/?id=1

I thought it would interpret that incorrectly. Is that wrong?

Brian

rajanikrishna August 31st, 2004 09:17 PM

hi,

  Madhu is correct. I tried its working by giving the index.asp as my default page in my website properties.

http://servername/virtualfolderaliasname/?id=1

But you must have index.asp in your folder.

its working fine.


madhukp August 31st, 2004 11:18 PM

This feature was there from IIS 5.0 onwards. If pagename is missing, it will assume the querystrings are sent to the default page of the directory.

happygv September 2nd, 2004 06:53 PM

But does that work only for the ROOT of the website or for its subfolders too?

_________________________
- Vijay G
Strive for Perfection

madhukp September 2nd, 2004 11:34 PM

This will work for all sub-folders also.

Imar September 3rd, 2004 01:10 AM

AFAIK, the client determines the next page to request.

When a browser requests a folder, a list of "default document" is then returned to the client together with one of the HTTP error codes indicating a folder was requested. The client tries to request the first document, and then the next if the first didn't exist and so on.

So /?id=1 would actually end up as Default.asp?id=1 once the browser has requested the page.

I could be completely wrong about this, so don't take my word on this, but this is how I think it works.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


All times are GMT -4. The time now is 04:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.