Securing web pages that downloaded

By . Category: Web Tags: , – Securing wesite page is an important thing for a web developer. Therefore, a website developer must know the parts anywhere in a web that has a high risk to be vandalized, taken the information, taken over the website, and other sebagianya. The process of securing websites ranging from web content including code created, the web server storage, and distribution to users using a web browser.

This time I will explain how to secure web that have been saved or downloaded by the user. Maybe for some people who have websites are not too problematic but for some others is very important for keeping the content created is not in duplicate by way of web downloads.

Many people prefer websites that have good templates or themes so the person downloading web pages or storing files on the computer they use. Many ways to save a web page file in which contents are important and interesting content such as text, images, and video. How to download this web there are various, including using media in the form of a browser that can be done to save the file directly to the website, saving to other formats such as PDF, there’s even software that can save the whole website.

As a web developer or owner of web content, we can not freely set the user (browser) using a website that we have, but there is little in the way if a web page that is downloaded in the open in a browser, the page redirect or divert to a webpage actual / online.

This method is very simple because we just add javascript and PHP code that will be used to redirect or divert web pages that have been stored into the actual web page. Code like the following:

<script language=javascript>
if(document.domain.toLowerCase().replace("www.","")!="'. $_SERVER['SERVER_NAME'] .'".toLowerCase().replace("www.","")){ 
  alert("Invalid Domain");
  location="http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] .'";
  location="http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] .'";

Explanation of the code above is as follows:

If the domain of the document or page is taken then the fox to lowercase and eliminate the subdomain “www.” (When opened in the browser) is NOT THE SAME AS domain name (taking the domain name in the process on the server) and then the fox to lowercase and eliminate subdomain “www.” it appears the warning message “Invalid Domain” and the page will redirect to the domain names and sub directories / page (in the process making the domain name server) that has been determined.

If the protocol of the locations used in the form of a file then the page will be redirected to the domain names and sub directories / page (in the process making the domain name server) that has been determined.

Already know right? if so, until here discussion on Securing web pages downloaded. Look forward to other interesting articles on


No comments yet untuk “Securing web pages that downloaded”

Tinggalkan Komentar