473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help With Htaccess

1
Hello there, I'm from Peru, Im wondering if there is any chance to block all IP's from Peru except for my own ip (dynamic IP address). I have tried with the htaccess file with no luck.

My actual address is 201.230.240.105

My htaccess file:

<Limit GET HEAD POST>
order allow,deny
deny from 161.132.0.0/16
deny from 190.8.128.0/19
deny from 190.12.64.0/20
deny from 190.40.0.0/17
deny from 190.40.128.0/17
deny from 190.41.0.0/17
deny from 190.41.128.0/17
deny from 190.42.0.0/15
deny from 190.81.0.0/18
deny from 190.81.64.0/18
deny from 190.187.0.0/17
deny from 192.102.84.0/24
deny from 200.0.107.0/24
deny from 200.0.110.0/24
deny from 200.0.118.0/23
deny from 200.0.136.0/24
deny from 200.0.142.0/24
deny from 200.0.164.0/24
deny from 200.0.165.0/24
deny from 200.0.166.0/23
deny from 200.0.168.0/24
deny from 200.0.169.0/24
deny from 200.0.170.0/23
deny from 200.0.172.0/23
deny from 200.1.176.0/21
deny from 200.3.114.0/24
deny from 200.3.241.0/24
deny from 200.4.192.0/18
deny from 200.10.64.0/19
deny from 200.10.130.0/23
deny from 200.10.188.0/24
deny from 200.10.250.0/24
deny from 200.11.32.0/24
deny from 200.11.34.0/23
deny from 200.11.36.0/24
deny from 200.11.37.0/24
deny from 200.11.38.0/23
deny from 200.11.48.0/20
deny from 200.16.0.0/21
deny from 200.24.160.0/19
deny from 200.31.96.0/20
deny from 200.31.112.0/20
deny from 200.37.0.0/16
deny from 200.48.0.0/16
deny from 200.60.0.0/17
deny from 200.60.128.0/18
deny from 200.60.192.0/19
deny from 200.60.224.0/19
deny from 200.62.128.0/18
deny from 200.62.192.0/20
deny from 200.62.208.0/20
deny from 200.62.224.0/19
deny from 200.89.0.0/20
deny from 200.89.16.0/20
deny from 200.106.0.0/18
deny from 200.106.64.0/18
deny from 200.107.128.0/18
deny from 200.108.96.0/20
deny from 200.110.0.0/19
deny from 200.110.32.0/20
deny from 200.121.0.0/17
deny from 200.121.128.0/17
deny from 200.123.0.0/19
deny from 201.230.0.0/17
deny from 201.230.128.0/17
deny from 201.240.0.0/17
deny from 201.240.128.0/17
deny from 206.223.130.0/24
deny from 209.45.0.0/17
deny from 216.244.128.0/18
allow from all
allow from 201.230.240.105
</LIMIT>


Thanks.
sanedt
Sep 12 '07 #1
0 1646

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Joshua Beall | last post by:
Hi All, How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value...
4
by: Ivo | last post by:
Greetings newsgroup, I am moving some php scripts to a new host. While getting to know the server, I ran into a strange problem. If I add a .htaccess file, or more specifically: a .htaccess with...
2
by: wandaring | last post by:
here's my problem If a visitor comes to visit my site and puts in his / her browser www . mysite.com/Ceciliasfirstpage.html (excluding the space) I want Ceciliasfirstpage.html to be generated...
7
by: John | last post by:
Hello. I want to get this blasted .htaccess file sorted out, so I can have sessions without register_globals being on. I have looked everywhere for info on this and I mean everywhere...
2
by: Jane Withnolastname | last post by:
I have seen many posts here eschewing the use of META tags, advising instead to use http headers. I have no idea what they are or how to get to them, so I would appreciate some help. My...
0
by: Jack Hambabo | last post by:
Hi, I'm searching for a php script that can find out whether the current user (I know _SERVER will give me the name for non-cgi php) has the right to view a specific file. My dream is that I...
4
by: Hermann.Richter | last post by:
I want to rewrite URLs like http://domain/dir/file.php?var1=val1&var2=val2#anchor to http://domain/dir/file?var1=val1&var2=val2#anchor In other words, I want to strip out the php extension ...
1
by: nickyeng | last post by:
I have checked this info from apache website, and i confused with it. Procteing System files it said: To run a really tight ship, you'll want to stop users from setting up .htaccess files...
1
by: Sean128 | last post by:
Hi, I hope someone can help me - this seems like it should be a really simple problem but I've been having trouble trying to solve it all week. I have hosted my website on a Linux server in 1...
0
by: veliscorin | last post by:
hi guys, i currently have a .htaccess that rewrites a certain url for example: http://localhost:8080/test/my_function to http://localhost:8080/test/index.php/my_function i have successfully...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.