$_SERVER['REQUEST_URI']', Apache 1.x/2.x IIS 5/6

From: Simon (spambucket_at_myoddweb.com)
Date: 03/25/05

  • Next message: Simon: "Re: The prefered 'login' procedure and redirect."
    Date: Fri, 25 Mar 2005 13:33:13 -0000
    
    

    Hi,

    When I have a page not found in Apache I can have it redirected to a custom
    ./error.php file and I can use $_SERVER['REQUEST_URI'] to get the file that
    was not found.

    But as some of you might know, IIS does not have '$_SERVER['REQUEST_URI']'.

    So what is a 100% secure way of finding the path of the requested uri using
    IIS?

    What I was thinking of doing is

    if $_SERVER['REQUEST_URI'] exists the return it
    else
    if $_SERVER[QUERY_STRING'] exists strip the relevant info from it and return
    the data
        but how do I know for certain what the format will be? in my case,
    (IIS6) I get
        $_SERVER[QUERY_STRING'] =
    404;http://www.example.com/unknown_page.php?var1=12&var2=14
        but it that the case for all of them? shall I return anything after
    '404;'?
    else
    return self?

    I obviously did a search on google, but most example/work around just don't
    work or don't achieve the expected result.

    Many thanks.

    Simon


  • Next message: Simon: "Re: The prefered 'login' procedure and redirect."

    Relevant Pages

    • $_SERVER[REQUEST_URI], Apache 1.x/2.x IIS 5/6
      ... When I have a page not found in Apache I can have it redirected to a custom ... I obviously did a search on google, but most example/work around just don't ...
      (comp.lang.php)
    • Re: Tools For Development
      ... hand-held PC's with Windows CE .Net V4.20. ... Please advise what tools I will need to develop a custom database driven app ... For more info, use google ...
      (microsoft.public.windowsce.app.development)
    • Custom Configuration. Help me, please, to spot the problem. Thank You.
      ... This is my test code to read an item of Google group in my Custom ... public class GoogleCollection: ConfigurationElementCollection { ... public string Type ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: [Full-disclosure] IE UXSS (Universal XSS in IE, was Re: Microsoft Internet Information Servi
      ... Brian, a question for clarification. ... When you say "customized 404 response", you are not referring to a customized error document but rather to having changed the headers that the server returns when queried with a GET request, correct? ... And wouldn't this require changing source code and compiling a custom build of apache? ...
      (Full-Disclosure)
    • Non-VBA way of making custom menus.
      ... Sorry for the new thread but even on Google, ... The webpage I quoted in my ... here is the non-VBA way to create a custom menu: ...
      (microsoft.public.excel.misc)