Correct HTTP response status code on "Access Denied" page.

Discussion in 'ASP General' started by diarmaid@calvert.com, Aug 29, 2005.

  1. Guest

    Hi,

    I have a password-protected area on my site. I'm not using any server
    authentication methods: Instead I prompt the user for a username and
    password using an HTML form and check these against a database of
    registered users.

    I was thinking that this page should be returning a HTTP status code of
    "401 Unauthorized" instead of its current "200 OK". My reasoning being
    that this would let search engines know what's going on when they
    request a protected page and get redirected to the "Access Denied"
    page.

    I experimented with adding response.status = "401 Unauthorized" to the
    "denied" page, but now it displays a (Windows/IE) username & password
    prompt instead. The HTTP sniffer shows that the www-authenticate field
    is set to "Basic".

    My question: How can I indicate to the search engines that the page it
    is requesting requires authentication, yet have it not display the
    login/password dialog box?

    Thanks in advance,

    --Diarmaid McGleenan
    , Aug 29, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George
    Replies:
    1
    Views:
    14,311
    shijobaby
    Feb 6, 2010
  2. George
    Replies:
    0
    Views:
    489
    George
    Oct 30, 2003
  3. James
    Replies:
    1
    Views:
    232
    James
    Dec 9, 2003
  4. Replies:
    1
    Views:
    188
    Pandurang Nayak
    Mar 22, 2006
  5. Patrick.O.Ige

    HTTP status 401: Access Denied

    Patrick.O.Ige, Dec 14, 2006, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    274
Loading...

Share This Page