logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: .htaccess file not effectively blocking un authorized users
Author
jnsunkersett



Joined: 30 Jan 2011
Posts: 23

PostPosted: Wed 28 Dec '11 6:31    Post subject: .htaccess file not effectively blocking un authorized users Reply with quote

Hi,

I have PHP application hosted in Apache 2.2.17
The php application exists under Apache2.2\htdocs\myPHP

Inside Apache2.2\htdocs\myPHP, I have a .htaccess file
Code:

order deny,allow
deny from all
allow from 203.99.213.16


But that is not effectively blocking users.

I wish to give access to users coming from only a specifc IP address (my work location public IP)

But I can access from home too (that is some other IP) .... in other words .htaccess file is not blocking unauthorized access.

Any clues?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Wed 28 Dec '11 19:54    Post subject: Reply with quote

Did you check the IP that is in the access log? IN worst case make a php script with
Code:

<?php
echo $_SERVER['REMOTE_ADDR'];
?>


and see which IP is shown.

Is the .htaccess working? What is AllowOverride set to?
Back to top


Reply to topic   Topic: .htaccess file not effectively blocking un authorized users View previous topic :: View next topic
Post new topic   Forum Index -> Apache