<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>mavenproject1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>net.sourceforge.dynamicreports</groupId>
<artifactId>dynamicreports-core</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>net.sf.squirrel-sql.thirdparty-non-maven</groupId>
<artifactId>napkinlaf</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>net.xp-forge.maven.plugins</groupId>
<artifactId>xp-maven-plugin</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>org.pushingpixels</groupId>
<artifactId>trident</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.swt.gtk.linux</groupId>
<artifactId>x86</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
<version>5.5.23</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0.b2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.5.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.jdesktop</groupId>
<artifactId>beansbinding</artifactId>
<version>1.2.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.1.Final</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swingx</artifactId>
<version>0.9</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
</project>
我发现了一些代码,但我不符合。 我如何使用它阻止我在巴基斯坦的网站?我不想在这个国家打开我的网站,所以有人能告诉我我在做什么吗?
答案 0 :(得分:1)
TCP / IP无法正常工作:您无法通过IP地址识别,更不用说“阻止国家”了。
即使你试图破解.htaccess文件,IP地址列表也会非常庞大......你仍然会错过很多。
建议:阅读本文,了解几种可能的替代方案:
http://www.sitepoint.com/how-to-block-entire-countries-from-accessing-website/
这是另一篇好文章:
https://www.raymond.cc/blog/easily-block-visitors-from-a-country-using-htaccess/
答案 1 :(得分:0)
有一个网站countryipblocks.net会为您生成htaccess文件。对于国家,显然你想选择巴基斯坦,然后你会想要选择“.htaccess Deny”选项,然后它会生成你需要的文件。
答案 2 :(得分:0)
输入.htaccess
文件并隐藏t:
<Limit GET HEAD POST>
order deny,
allow deny from 72.229.28.185
allow from all
</Limit>