Re-wording QueryString

Results 1 to 6 of 6

Thread: Re-wording QueryString

  1. #1
    Join Date
    Dec 1969

    Default Re-wording QueryString

    I am looking for a way to re-word the url w/querystring from:<BR><BR> <BR>to<BR><BR>in such a way that the server will recognize anything after the .asp as a querystring. I am aware that this wouldn&#039;t work for form data, but if i can at least make the pages list this way in dynamically built lists, that would solve a great big problem for me. <BR><BR>can this be done on an IIS server?<BR><BR>-Echo<BR>

  2. #2
    This can't be done.. Guest

    Default RE: Re-wording QueryString

    because the IIS server would try to find a document with the full name you specify if you don&#039;t use the ?var=val syntax. However you could do something like:<BR>somepage.asp?v=var/val/var2/val2 etc.<BR><BR>Then in the page you get the querystring (in this case using strQueryString = request.querystring("v")) you could break up the strQuerystring var with e.g. the Left, Mid and Instr() functions. Maybe this works for you. <BR><BR>It is possible to use another ext than .asp for your asp files (you should set this up in IIS) but you still have to use ?var=val.<BR><BR>Good luck<BR><BR>Peter<BR><BR>remains the big question: why would anyone want to leave out the "?" ???

  3. #3
    Join Date
    Dec 1969

    Default Well, maybe...

    What you probably *could* do is convert<BR><BR> <BR>to<BR><BR><BR>and *presumably* that page will not be found on the site, yes? So IIS generates a 404 error.<BR><BR>So then you create a custom 404 error handler page which inspects the URL and then does something appropriate. Because the page not found is a .asp page, you can write the error handler as an asp page, as well, as I understand it.<BR><BR><BR>

  4. #4
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Maybe if you told us WHY??

    The we can tell you what you really NEED to do.<BR><BR>

  5. #5
    the other steve Guest

    Default here's one way maybe

    In the root directory for and on the default.asp page<BR><BR>dim host<BR>host = lcase (request.servervariables("SERVER_NAME"))<BR>host = replace(host, "?", "/") &#039;replace the ?<BR>host = replace(host, "=", "/") &#039;replace the =<BR>response.redirect(host)<BR><BR>if the page don&#039;t exist you&#039;ll get 404 a la what bill said.

  6. #6
    Join Date
    Dec 1969

    Default RE: Re-wording QueryString

    try <BR>request.servervariables("PATH_INFO")<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts