Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Changing web link output

by joe++ (Friar)
on Nov 22, 2002 at 16:31 UTC ( [id://215163]=note: print w/replies, xml ) Need Help??


in reply to Changing web link output

Hi Unknown Monk,

If I interpret your question correctly, you are looking for a way to implement file system access privileges over http.

The classic way to do this, is by configuring the webserver to use basic authentication. You will have to provide your own user/password ist in that case.

For the Apache webserver, the docs are here. This is further not Perl related, until you start thinking about implementing your access mechanism in Perl...

--
Cheers, Joe

Replies are listed 'Best First'.
Re: Re: Changing web link output
by Anonymous Monk on Nov 22, 2002 at 17:50 UTC
    No, actually I just want to change the message that comes on the browser when the link is clicked to say "You do not have permissions to view this document". I thought there might be some sort of output manipulation that perl would have to do this with an output message.
      Here's how I read your question:

      You've got files in a directory protected by .htaccess

      You can access them 'cause you know the username/password

      Others who don't know the username/password can't

      If the above is true, that's 401 error, I believe.
      If I'm correct, then you can add a line to your .htaccess file:

      ErrorDocument 401 /401.html

      and place a file named 401.html in that directory that
      includes the message you'd like your not-allowed person
      to see.

      CH from NE PA

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://215163]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-20 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found