dark dude Posted July 26, 2006 Share Posted July 26, 2006 I'm using htaccess to [i]try[/i] and block specific people from using my site...Big failure/10[code]order deny,allowdeny from 81.177.15deny from 81.177.14deny from 85.255.113deny from 85.255.114deny from 195.225.176.86deny from 85.255.117.250allow from all[/code]I'm trying to do something like that (I used made up IPs for this display so nobody is threatened).So, I blocked my friends IP as a test, and he could still use my site as normal...My friend does not use a dynamic IP...So, how [b]do[/b] you block IPs from your site using htaccess, what am I doing wrong, and how what does someone entering from a "denied ip" see?Thanks,~Dark dude~ Quote Link to comment Share on other sites More sharing options...
dark dude Posted August 3, 2006 Author Share Posted August 3, 2006 bump >_> Quote Link to comment Share on other sites More sharing options...
apacheguy Posted August 3, 2006 Share Posted August 3, 2006 I have it configured in the apache config file instead of the htaccess. Here's how I get it to work:<Directory "C:/Program Files/Apache Group/Apache2/htdocs"> Order allow,deny Allow from allDeny from ipDeny from ip</Directory>If you want to use htaccess you may have to configure an override option in apache. Quote Link to comment Share on other sites More sharing options...
youcantoo Posted August 11, 2006 Share Posted August 11, 2006 [quote author=dark dude link=topic=101947.msg403958#msg403958 date=1153929333]I'm using htaccess to [i]try[/i] and block specific people from using my site...Big failure/10[code]order deny,allowdeny from 81.177.15deny from 81.177.14deny from 85.255.113deny from 85.255.114deny from 195.225.176.86deny from 85.255.117.250allow from all[/code]I'm trying to do something like that (I used made up IPs for this display so nobody is threatened).So, I blocked my friends IP as a test, and he could still use my site as normal...My friend does not use a dynamic IP...So, how [b]do[/b] you block IPs from your site using htaccess, what am I doing wrong, and how what does someone entering from a "denied ip" see?Thanks,~Dark dude~[/quote]Did you have "AllowOverride all" set within your httpd.conf file? Normally one would see and "Access Forbidden" error when trying to access a blocked area. Another posted suggested blocking ip using the apache config file instead of the .htaccess file. That method is by far better than using the .htaccess By using .htaccess the server has to do a lot more work looking for the .htaccess file within all directories, there by slowing down the serving of files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.