Most modern websites built using content management systems or, more simply, 'engines'. A key feature of such systems is that the pages of this site are dynamically created based on templates and information from the database. This approach provides a very flexible and convenient management of the site, but the site will contain various auxiliary files. For example, php scripts, configuration files, template files. These files are invisible to the average user (if it uses only the links posted on the site), but it can be indexed by search engines. Indexing of these files is not highly desirable, because they do not contain all no useful information (texts of articles, comments, etc.
are usually found in the database), and the traffic is consumed. The robots.txt file contains a set of rules that allow utilities to close any files on the web for indexing. Approach to the creation of such a file must be very careful, because You can easily hide the pages with useful content. In the first place you can look for a robots.txt file ready for your engine (for wordpress, I found pieces of 5 different files). After that, check that all the directories with all the service files denied access.
The next step is to check the syntax file. It is convenient to perform with the Yandex (). Now the main thing. We must verify that all pages our site available to robots. There is convenient to use the service Google webmasters tools (). To use it you have to create an account and confirm ownership of the site (you need to place a file with a special name in the root site). I advise you to read 'all the file robots.txt' and the article 'How do I check the file robots.txt'. That's it. Successful 'saitostroitel'stva'.
Simple, effective and easy to use script. In fact, to find out who is on site at the moment – impossible. But do not rush to close this article and a wide variety of swear words. There is a solution to this problem – to track who downloaded the pages for some time. This is what the script is engaged.
To identify a user uses his external / internal ip-address and data about the system. To start, create a file Fill in the name of the file online.php following content. Do not forget to read the comments: / / Number of minutes during which users are deemed to be 'online' $ time = 5, / / data area, the next line MUST pre-check = 0 ', FALSE); header (' Pragma: no-cache '); / / Defining internal and external ip-address $ ip 0 = $ _SERVER ' REMOTE_ADDR '; if (isset ($ _SERVER 'HTTP_X_FORWARDED_FOR')) $ ip 1 = $ _SERVER 'HTTP_X_FORWARDED_FOR'; else $ ip 1 =''; / / get the data browser $ browser = $ _SERVER 'HTTP_USER_AGENT'; / / Get hash of the user data $ user = md5 ($ ip 0. $ ip 1. $ browser); / / fasten to the hash of the last for 5 minutes.
Time can be changed in the file online.php. Connecting the script to the page: To integrate the script into your web site uses java-script. To insert the number of users – add to your page in the right place the following code: B result – in this space will be inserted digit for the number of users you can use code like this: As a result – in this space will be inserted figure and the word "user .." with the right ending.
Recently, often when describing the creation of a website mentions that using semantic markup. It is particularly a lot of new sites being developed with complete disregard of this approach that causes pain. So what is a semantic markup, and what advantages using it? For the layout of Web pages using HTML language or its more modern version, XHTML. The semantics of this language is determined by the semantic the value of his designs. For example, the h1 tag indicates the title of the highest level, and the tag li – a list item.
If all fit on the tag is used for the purposes for which they are intended, therefore, there is a semantic layout. For example, menu items are correctly represented in the form of list items and not – as a table row. If the markup elements are not being used as envisaged, then, the site does not apply semantic layout. The most common example of a derogation from the rules of semantic markup is a table layout, where the table tags are not for the formation of a regular table, but solely for the purposes of registration. So what are the advantages of semantic markup, and why it is recommended that you use it? First, the HTML code in the application of such a layout is more transparent and logical, it's easier to understand to any expert and, if necessary, change. Every developer knows what shall be used standard tags to HTML, but is not always possible to guess the appointment of any of the markup, if not used for semantic layout, and layout designer uses tags for other purposes. Of course, some developers are interested in sites that their child did not understand anybody, except them, but these would-be developers should not involve the creation of websites under any circumstances. Semantic markup is closely connected with the separation of data and presentation.