How do I prevent a Web site from being mirrored or IFRAME?

Source: Internet
Author: User

Many websites now use independent IP space, a lot of independent IP space can be directly accessed through the IP site, bringing convenience and also bring hidden dangers (directly affect corporate image and reputation), the site is easy to be images of people with ulterior motives.

1. Prevent the site from being mirrored (malicious parsing and forwarding, etc.)

Previously used a Beijing space quotient of the independent IP host, you can directly access the website via IP, a chance coincidence, check with the IP site how many "independent IP generally do not go to view, because is independent, only own in use", found that there is really a domain name, open that domain name, actually show my site, ping the next domain name IP , it is my space IP. At that time, no experience, submit work order let space quotient to solve, space quotient should be blacklisted that domain name, not allow access to my space IP, but if there are other domain name mirror, is not every time to submit work order to let the space business processing? One is the trouble, the second is the palliative. Then we searched for solutions and found no suitable solution.

Solution: these days to a site to do 301 jump, do not take all the WWW jump to take the WWW domain name up, write good rules, pass up, all ok! It suddenly occurred to me that this method could solve the problem.

Code:

Http.ini can write "Rewritecond Host:!^www.web\.cn$ rewriterule (. *) http\://www\.web\.cn$1 [I,RP]"

. htaccess can write "Rewritecond%{http_host}!^www.web. cn$ [NC] rewriterule ^ (. *) $ http://www.web.cn/$1 [l,r=301]"

The meaning of the code is very simple: access to the site's domain name if it is not "www.web.cn" will automatically jump to "www.web.cn". Such settings are not afraid of their hard-to-maintain site was mirrored by others.

2. Prevent URLs from being IFRAME

Code: Add the following code at the bottom of the page or other common areas

<script type= "text/javascript>
if (window!=parent)
Parent.navigate (WINDOW.LOCATION.HREF);
</script>
The meaning of the code is also very simple, using the JS method to detect the address bar domain name is not the current site binding domain name, if not, then jump to the bound domain name, so that the site is not afraid of others iframe.

3. Prevent Web sites from being simulated by Python URLs or by program functions such as PHP Crul

The principle of the code of the use of anti-theft chain principle to prevent site elements are outside the station malicious call or collection

4. Using reverse proxy to disguise the same situation as the target site

This has to be done by installing web security software on the server to solve this kind of problem

5. How to prevent the site from being copied or downloaded

Reference Document: Http://www.3lian.com/edu/2013/10-12/101296.html

6. Snapshot and cache others sites

This can be done by technical means to find the other side of the fake address, and then go through legal channels to negotiate settlement

7. Search Engine Hijacking jump

See if the website is hung up or the keywords are misused by other people.

8. Browser or network operator hijacking jump

This can install security software or modify the DNS for processing, really no complaints it.

"Soft text learning recommendation" Baidu Hundreds, headlines, today's headlines, idonews column, Eric Column, interface, fast-path network, tiger sniffing, Blue whale TMT, Whip bullfighters, Sohu it, Sohu News client and other media


How do I prevent a Web site from being mirrored or IFRAME?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.