Re: Restricting access to a website [message #174857 is a reply to message #174854] |
Wed, 13 July 2011 19:49 |
Michael Fesser
Messages: 215 Registered: September 2010
Karma:
|
Senior Member |
|
|
.oO(Luuk)
> On 12-07-2011 02:38, Jerry Stuckle wrote:
>>
>> No need to even go to that trouble. It can all be done in the Apache
>> configuration with no changes to the web pages at all.
>
> Jerry,
> Can you explain the REAL benefits of doing this in apache,
> despite the fact that this is a PHP-newsgroup?,
In this case, given the fact that limiting access can be based on static
IPs, it would be easier to implement and more efficient to do it on the
Apache level.
> And the real drawbacks from changing a bit to his own php-code just for
> this case?
IMHO it mostly depends on the way his scripts are written. In case of a
front controller, i.e. a single entry point to the website, there's not
much of a difference to the Apache way, let aside performance. But if
the website consists of individual scripts, then it might be necessary
to add the same authentication code to a whole bunch of pages.
Then there also might be things like image directories. If you want to
protect them, you either add some lines to an .htaccess file or have to
deliver all the images by a script, which makes things more complicated.
Micha
|
|
|