|
Posted by Lars Eighner on 06/15/07 08:13
In our last episode,
<1181887635.939663.70170@x35g2000prf.googlegroups.com>,
the lovely and talented Nosferatum
broadcast on comp.lang.php:
> Hi, on my Apache server I want to limit access to a certain file ouput
> (from php/MySQL) to just one IP. The idea is that users from another
> site should click a link whic redirects them to my special page on my
> server. Only those who access my page from one particulary URL are
> allowed to see my file. All others are denied.
> Is it possible to solve this with a .htaccess file, or do I need a php
> solution?
You can do this on a per directory basis in the Apache config file
or .htaccess if enabled, or per file by checking the REMOTE_ADDR server
variable in PHP. However, neither of these things should be mistaken for
any real degree of security.
This is a step up from "Please do not click unless you are authorized to do
so" but not a very big step.
--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 585 days to go.
Why "War Czar"? That sounds like Imperial Russia!
Call it by the American term: "Fall Guy."
Navigation:
[Reply to this message]
|