Secret Techniques: WordPress - CNC Tuning. Correct cnc setup in WordPress cnc setup in WordPress

V this material we will try to clarify how the CNC should look correctly in WordPress, whether it is necessary to switch to CNC, if the site is several years old, which plugin to use to create CNC, etc.

The actual CNC is humanoid or human-understandable urls (links).

If you do not perform any settings, then in the standard form they will look something like this: sitename.ru/?p=255. As you can see, such a link does not carry any structure; it is completely unclear what is hidden under this link. Well, with the help of CNC it becomes possible to bring the same link to the form: sitename.ru/lichnoe/itogi-za-2016-god.html. Here's an example of a correct CNC.

That is, it immediately becomes clear what in question in the article, and to which heading it belongs. Often you can also find a CNC of the type: sitename.ru/itogi-za-2016-god.html. There is little difference - only the heading where the article is located was removed, but we believe that this is the wrong format for the CNC output, because search engines cannot see your entire site structure, and this, in turn, is the foundation for building and promoting any resource.

The use of CNC provides a number of advantages:

  • the CNC link allows you to immediately, albeit approximately, say about the content of the material;
  • such a link is easy to remember and can even be dictated;
  • CNC may include keywords, which is good for SEO optimization;
  • thanks to the CNC, you can navigate among the sections and headings of the resource.

Setting up the WordPress CNC

To set up human links, you need to go to the admin panel and go to the "Permalinks" tab. Here we select the item "Arbitrary" and enter this code:

/%category%/%postname%.html

When pasting the code, make sure you don't have any trailing blank spaces. That's all, but if you want to customize the CNC in your own way, you can experiment with the standard functionality. If you need more features, then read on - we will "poke around" in the plugins.

RusToLat - plugin for transliteration of Russian links. Some administrators prefer to use Russian symbols for links, they say, search engines have been friends with the Cyrillic alphabet for a long time and they look really beautiful. But in fact, this solution has more disadvantages than advantages.
Well, let's say try to copy a link like sitename.ru/privet-mir.html and pass it on to your friend, for example, in social media. Vkontakte network. The link will no longer look so attractive, it will be very much "open": sitename.ru/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82-%D0%BC% D0% B8% D1% 80.html. Actually, all these incomprehensible characters are just an encoding, because each Russian character is replaced by 6 Latin characters (for example, the Russian letter "A" will turn into the set "% D0% B0").

But that's not all. In addition to the inconvenience of such a transformation, other problems may arise. So, many plugins for WordPress that run on AJAX do not understand that Russian characters may be present in the links, due to which they begin to malfunction or even refuse to do what they were created for.

Lack of transliteration plugins like RusToLat will sooner or later lead to problems with other plugins that work with files. So, the well-known WordPress File Monitor security plugin refuses to accept Russian letters at all. And as mentioned above, there are a lot of such plugins.

We believe that transliteration plugins should be installed on the site. However, you can do without such CNCs, so nothing critical will happen if you refuse to carry out such a decision. Many bloggers use a "clumsy" presentation format, and some of them believe that the inconvenience of copying links is not so important, but if there is incompatibility with some plugins, then you can simply find their analogue.

So, you need to download the RusToLat plugin and install it. You can get it at the URL: http://mywordpress.ru/plugins/rustolat/. Installation is standard: unpack the archive, copy the "rustolat" folder to / wp-content / plugins, go to the admin panel and activate RusToLat. Note that the plugin has no settings, but there is only one option - the transliteration standard. We advise you to set the standard ISO 9-95 or GOST 16876-71. True, ISO more closely matches the rules prevailing on the Internet.

Despite the thoughtfulness of the standards, we did not really like how they translate the Russian letter "X" into the Latin alphabet: GOST replaces it with "KN", and ISO with the Latin "X". We will not describe the replacement process, but you can edit all this disgrace at your discretion in the rus-to-lat.php file.

Actually after all this, the plugin will create records on your resource and automatically transliterate. However, let's make a reservation that the RusToLat plugin will not change existing records, but no one forbade doing this manually. To do this, you just need to delete the old Russian title, click on the "Ok" button, after which the plug-in in auto mode will make a new title, where transliteration will already be performed.

By the way, this is both an advantage and a disadvantage of the plugin. If you do not have a desire to change existing links, then RusToLat should be used, but if you need to replace a bunch of headers, then in this case you should take a closer look at the CyrToLat plugin, which transliterates all headers upon activation. By the way, this plugin also has a lot of other advantages, so it's worth considering its capabilities.

CyrToLat Plugin

The main advantages of this plugin are: the ability to automatically translate links into transliteration in existing articles; the ability to transliterate downloaded media files into the Latin alphabet; the ability to implement an automatic redirect with Russian links.

This plugin is especially relevant when, after activating CNC and RusToLat, articles begin to display a 404 error, that is, they become inaccessible. In this case, after installing CyrToLat, you need to refresh the page / post and the problem will disappear by itself. Sometimes errors occur with records / articles after transferring files to another hosting or after their restoration. In this case, you also need to go to the WordPress admin panel in the "Permalinks" section and update the settings. Now everything will be as it should be.

Is it worth it to replace links to CNC, where there is already attendance

This is an acute issue for many administrators. We tested on several client sites and did not notice any positive effect on SEO. But on the other hand, there is a lot of additional work due to new addresses, for example, you need to set up redirects, etc.

You can approach this question in the following way: if the website traffic is less than 100 people per day, then you can change the type of CNC, but if the audience is much more than a hundred, you should not create an additional headache for yourself. It is important to emphasize that many search engines are not very welcoming to significant changes in the structure of the resource. That is why the most correct way out of the situation is to use the CNC from the very beginning of your project.

Advanced Permalinks Plugin

Very interesting solution, which carries a huge functionality with which you can migrate from the old scheme of permalinks to the new one, while not losing positions in the search engine results. If attempts are made to follow links with the wrong structure, the user will be automatically redirected to the correct URL. Very comfortably!

Despite the fact that work on the plugin was suspended for for a long time, now it is available in Russian, Uzbek, Bulgarian, English, Lithuanian and Belarusian. Here's an example of how the plugin does the job: sometimes you might want posts in a certain category to appear elsewhere. So, the usual structure may look like: / 2007/05/02 / my-comment, but if you want to make everything a little simpler, for example, like this: / reviews / my review, using the Advanced Permalinks plugin you can do it all in a couple of minutes. You just need to understand the settings a little.

I am glad to welcome you to my blog! You still don't have human-readable URLs on your site and have you started thinking about it? Then this article is for you.

What is CNC

The CNC (human-readable URL) of the site is the URL of the page formed in such a way that its name makes it clear what the article is about. Here are two pictures: the first one is a regular URL, the second one is already human-readable.

In general, I believe that human-readable URLs need to be configured on each site, especially if you have a young site, for example, with a traffic of no more than 100 people per day. If you have just created your website, feel free to use the CNC. On a more mature site, you still need to think about it.

CNC advantages

There are many advantages to human-readable URLs, but in my opinion, the most important ones are:

    • By the look of this URL, you will immediately see what the article is about.
    • Search Engines Highlight Match keywords in the URL of the page with those that the user enters into the search bar

  • From human-readable URLs search engines will be able to compose the correct structure of your site
  • Once on the site, a person will be able to manually navigate the site

Correct CNC setting

So, let's get down to practical steps. In order to set up the correct CNC controls, go to the site admin panel. Next, in the main menu, select the item " Settings", And in it the subparagraph" Permalinks».

In the window that opens, set the radio button switch to "Arbitrary" and drive the following spell into the input field: /%category%/%postname%.html. This structure is the most optimal for website promotion.

You ask, what if I want to strip the ".html" from the end of the URL string? I’ll answer you that you don’t need to do this, because the structure of the site becomes unclear. From such a URL, it will be difficult to understand whether this is the category in which the article is located or this is the category in which there is a subcategory.

Installing the cyr to lat enhanced plugin

Before starting to install the cyr to lat enhanced plugin for WordPress, let me tell you about its advantages over rus to lat:

  • Unlike rus to lat, it is updated and supported. Rus to lat was last updated four years ago
  • If the site had articles before its installation, then it will automatically make human-readable links out of old links

So let's get started. In the main menu of the site admin panel, select “ Plugins", Further " Add new". On the next page, in the plugins search field, type in “cyr to lat”. Select “cyr to lat enchanced” in the search results. Also, do not forget to activate it.

We remove the "category" from the link to the category

To solve this problem, I spent a lot of time on the Internet. On some sites it was said that a special plugin should be installed, on others that it was necessary to use the “.htaccess” file for this. I even saw that it was advised to insert a special php function into the code. But what was my surprise when I found this method, which I will now share with you. I think you will be surprised no less than mine.

To remove “category” from categories in WordPress, you just need to go to the settings “ permalinks". There, in the "Additional" section, find the "Prefix for headings" field and insert a period (".") There. It's that simple.

So, the summary. We learned what CNC is, how to make human-readable urls in WordPress and why we need it. If you have any questions or wishes, you can leave them in the comments. Good luck and see you!

Best regards, Evgeny Kuzmenko.

A step-by-step guide to help you understand how to set up a cnc machine right.


Setting up a CNC machine means putting it in a state of readiness for processing a workpiece. When doing this, make sure that the device automatic change tools have everything necessary tools for processing an existing workpiece, loaded correct program with g-code, and the machine is ready for work as a whole.

Professional advice: use setup charts

If you work as a CNC machine operator in production and are engaged in machine setup, you probably have a setup sheet at your disposal, which contains the entire the necessary information about the procedures and stages of adjustment.

1. CLEAN MACHINE WORK TABLE AND OTHER WORK SURFACES

Result: the machine is cleaned of shavings and other debris, which can cause a decrease in the efficiency and accuracy of technological operations.

To properly set up your CNC machine, clean the machine work table as well as the fixtures of coolant residues, shavings and other debris. For this, you can use compressed air, a brush or a washing machine. You need to make sure that no shavings and debris get into sensitive areas of the machine. Air jet under high pressure can blow debris into areas of the machine where it should not be, which in turn can cause damage to machine parts.

2. LOAD TOOLS INTO THE AUTOMATIC TOOL CHANGER

Result: The automatic tool changer contains all the tools required to machine the workpiece according to a given g-code program.


Tool trolley on
wheels for CNC machine

Note: If your CNC machine does not have an automatic tool changer, you will still need to have all the tools you need ready for the job so that you can quickly replace them in the machine spindle when needed, and to quickly set up your CNC machine.

In this case, our goal is to be able to fix the cutting tools in the chucks (or just have them at hand if the spindle of your machine does not require the use of several interchangeable chucks), as well as to install these chucks in the device automatic tool changers or place them in a convenient place so that they are at hand during machining or manual tool changes.

If you have a machine setup card for a specific technological operation, it will indicate the necessary tools to perform the machining that will help you set up your CNC machine correctly, as well as their numbers in the g-code program.

We usually place the tools required for a particular technological operation on a trolley or pallet for tools. Perhaps all of your tools are kept in a toolbox on the shop floor. You put all the tools you need on a cart, roll it up to the machine, and then load the tools into the magazine.

Each type of chuck implies its own requirements, the observance of which is necessary to achieve maximum efficiency and correct setting of the CNC machine. For example, ER collet chucks have a nut torque requirement that must be adhered to.

3. WARM UP MACHINE AND SPINDLE

Result: The CNC machine is warmed up and ready to go.

To properly set up your CNC machine, you should consider setting up a warm-up program for your machine and spindle at the start of your day. This will help minimize thermal expansion when going from room temperature to operating temperature (the warm-up program will ensure a smooth transition of the machine to normal operating temperature), as well as good lubrication of the working axes and the machine spindle.

4. SET THE CORRECTION RATING TO THE LENGTH OF THE INSTRUMENT

Result: the tool face of your CNC machine has length compensation values ​​for all the tools you use.


Setting the correction values ​​to
tool length with
device for dimensional adjustment
instruments

To set up a CNC machine, the machine needs to know how long the tool is based on a reference value called a reference point. It uses this information to adjust the spindle position relative to the specified coordinates for each tool separately.

It is very important that the tool length compensation values ​​are correct and accurate for each tool. This is necessary to ensure maximum machining accuracy with each tool after setting up the machine. If the tool length compensation value is set incorrectly, it can lead to unpleasant consequences in the form of tool damage and most likely also result in damage to the machine or fixture.

Some machines are equipped with a tool for sizing tools. This is a special sensor that is used by the machine to automatically measure the length of tools. In other cases, the length of the tools is measured offline (ie, not on the machine) - entered by the machine operator into the tool parameters table. Entering such data can be done in one of the following ways:

It is very important to follow all procedures so that the correct tool length compensation values ​​are entered in the tool design table.

5. SET TOOL DIAMETERS TO BE ABLE TO USE TOOL RADIUS CORRECTION FUNCTION

Result: the tool data table contains all the necessary information about the diameters of all the tools used.

If the program will use the tool offset function, the machine needs to know the diameter and length of each tool.

6. INSTALL CLAMPING DEVICE

Result: the clamping device for holding the existing workpiece is correctly positioned on the machine.


A typical double vise representing
two pairs of vices, assembled in one unit

At this stage, the installation of the device for securing the workpieces is carried out. There is a wide range of clamping devices on the market. In this case, the setup chart performs another important function - determining what kind of clamping device is needed to fix the workpiece during a specific technological operation.

7. SET THE ZERO POINT OF THE WORK AND MACHINE

Result: the zero coordinates (0, 0, 0) of the CNC machine exactly coincide with the required coordinates of the workpiece zero point. All machine zero points correspond to the required values ​​and are stored in control program.

To set up a CNC machine, you need to enter the coordinates of the zero point into the memory of the machine (see the article "How to find the zero point of the machine") of the workpiece. Exists whole line ways to accomplish this task. The purpose of using machine zero points is to have multiple workpiece zero coordinate values. This is convenient in cases when it is necessary to process several workpieces, each of which has different zero point coordinates, or in the case when it is necessary to fix several workpieces on separate fixtures, and each of the workpieces has its own zero point coordinates.

8. LOAD THE CONTROL PROGRAM INTO THE MACHINE

Result: the corresponding NC program with g-code is loaded into the machine memory.

flash drive per unit
management

You need to load a control program with a g-code into the machine memory (see the article "Description of G codes"). - this operation is part of the machine setup procedure. Depending on the machine model, it can be done in several ways:

  • To load a g-code program into the memory of old machine tools, you may need a floppy disk or even paper punched tape (on VERY old models!).
  • Downloading a program with g-code to the memory of more modern machine models is possible using the USB port.
  • Your machine can be connected to local network, which will load the program by simply copying the g-code into separate folder or by uploading it from an FTP server to the machine memory.
  • Your machine can be connected to a device containing a g-code program using the RS-232 protocol. In this case, the g-code can be loaded into the memory of the machine through this connection, or it can be transmitted step by step at several times per unit of time.
There are a number of important points to check:
  • Make sure you have the correct version of the control program at your disposal. It is very easy to get confused about the many different versions, so make sure you have the version you want at the moment.
  • Load all the necessary subroutines and their libraries that the main part of the program might need. For example, if the control program uses data received from the sensors, its operation may require the presence of a subroutine library for taking readings from the sensors.
  • You must clearly know what actions the control program expects from the machine operator during operation. Does it offer the possibility of stopping? Do you need to run the program from the control unit? Etc. To set up a CNC machine, this information must be entered in the setup sheet.

9. INSPECT COOLANT SYSTEM

Result: The coolant test has been completed and you are now ready to run the g-code NC program.

In order to set up a CNC machine, make sure that the coolant you are using is in good condition and suitable for use, which will be one of the preventive measures for maintaining the machine in order to prevent possible malfunctions in its operation before starting the machining operation. blanks. I repeat - this procedure the latter is carried out, however, you may have your own schedule for checking and replacing the coolant, which involves more frequent checks and ensures that it is in good condition.

It is important to pay attention to the following points:

  • If the coolant smells bad or rancid, you have a problem.
  • Is there enough coolant in the tank or does it need to be refilled?
  • Is the concentration of cutting fluid sufficient in relation to the amount of water contained in the solution? You can also use a refractometer to measure the coolant concentration.
  • Are you filtering coolant to remove small chips and debris that could clog your feed system?
  • Check the machine to make sure the coolant is flowing freely and the nozzles are in the correct position. A well tuned coolant system is especially important for chip removal and may even allow you to slightly increase feed rate and spindle speed.

You may also be interested in.

Hello everyone!

V last time new articles on the site are not published as often as we would like, but I promise to improve :)

Once you've installed WordPress, the first thing to do is customize the CNC (human-readable url ) .

The CNC installation is needed so that the address of your pages is understandable to a person. Initially, the WordPress link looks like this: https://test.ru/?p=1 (this is the address to the article "Hello-World", which you already have), whatever you say, it is not entirely correct and beautiful. But after the settings, your links will look like this: https://test.ru/privet-mit.php. Agree so much more beautiful. And such URLs are better perceived by search engines.

How to set up a CNC in WordPress

Go to the blog admin panel, open Settings - Permalinks (CNC).

I propose to put a tick above the item "Arbitrary structure" and enter the code there.

/%category%/%postname%.php - includes the category and title of the post in the address.

/%postname%.html - here only the post name.

It looks something like this:

After what has been done, be sure to press " save changes».

Installing the RusToLat plugin

- with the help of which transliteration of Russian letters into Latin takes place and human-like urls are formed.

And we activate it in the admin panel.

If you took some time to set up the CNC for WordPress (some articles have already been written), then WordPress has a glitch - the titles of articles and headings may not be transliterated. In this case, you need to open each article and heading for editing and save without changing anything. The second problem associated with the fact that you did not immediately start configuring the urls is that some links continue to lead to old page addresses, as a result we see a 404 error. To fix this, you need to install the Permalink Redirect plugin, which will register a 301 redirect with old pages to new ones.

CNC and .htaccess

When you change the structure CNC WordPress maybe it will create the file itself .htaccess... But it happens that due to the settings hosting WordPress cannot create a file. Then you need to do it yourself.

We create a file. htaccess and put it in the root directory of your blog. To file .htaccess you need to put the code that WordPress offers.

That's it, now you have made the basic settings for your blog.

Any problems I will answer in the comments!

To store identifiers of elements / sections of information blocks, it is most convenient to use the field Character code... For example, in the link www.myserver.ru/catalog/mobile/nokia_3310/, mobile- this is the symbolic code of the section Mobile phones , a nokia_3310- the symbolic code of the element located in the section Mobile phones... The symbolic code must be unique and the system itself checks the uniqueness.

In the 404 error handler, it is necessary to "parse" the $ _SERVER ["REQUEST_URI"] variable into the required identifiers. PHP has a number of useful functions for this:

$ match, "ACTIVE" => "Y")); // $ match contains the login if ($ arUser = $ res-> GetNext ()) (// display the user's data) else (// error: there is no such user) require ($ _ SERVER ["DOCUMENT_ROOT"]. "/ bitrix / footer.php "); ) else (header ("HTTP / 1.1 404 Not Found"); // error)?>

But a tough check in preg_match will not allow making links like www.myserver.ru/users/user_login/?r1=banner&r2=computerra.ru, which are very necessary for the analysis of advertising campaigns. Therefore, at the beginning of the file 404.php we write:

$ val) (global $$ key; $$ key = $ val;))?>

Examples of

Example 1

News like /about/news/23.html (print link /about/news/print_23.html) instead of /about/news/detail.php?ID=23 ( /about/news/detail.php?ID=23&print=Y)

  • mod_rewrite RewriteEngine On RewriteBase / RewriteRule ^ about / news / (+). html $ about / news / detail.php? ID = $ 1 RewriteRule ^ about / news / print _ (+). html $ about / news / detail.php? ID = $ 1 & print = Y
  • 404 error handler0? "Y": ""); $ _REQUEST ["ID"] = $ match; include ($ _ SERVER ["DOCUMENT_ROOT"]. "/ about / news / detail.php"); ) else (define ("ERROR_404", "Y"); header ("HTTP / 1.1 404 Not Found"); require ($ _ SERVER ["DOCUMENT_ROOT"]. "/ bitrix / header.php"); $ APPLICATION-> SetTitle ("404 - file not found"); require ($ _ SERVER ["DOCUMENT_ROOT"]. "/ Bitrix / footer.php");)?>

Additionally

How to remove "PHPSESSID = ..." from URL?

To get rid of the session id in the URL, uncomment the line in /.htaccess:

Php_flag session.use_trans_sid off

If this does not work, you must change the value of the session.use_trans_sid parameter to Off directly in php.ini on server.

Also make sure that session.use_cookies is set to On.

How to remove the question mark from the page URL?

To do this, follow these steps:

  • .htaccess with the following content: ErrorDocument 404 /news/404.php
  • create a file in the / news / directory 404.php with the following content:0) ($ par = substr ($ url, strpos ($ url, "?") + 1, strlen ($ url)); $ arr = explode ("#", $ par); $ par = $ arr; $ arr1 = explode ("&", $ par); foreach ($ arr1 as $ pair) ($ arr2 = explode ("=", $ pair); global $$ arr2; $$ arr2 = $ arr2;))) initialize_params ($ _SERVER ["REQUEST_URI"]); require ($ _ SERVER ["DOCUMENT_ROOT"]. "/ bitrix / modules / main / include / prolog_before.php"); $ arr = explode ("?", $ arrPath ["basename"]); $ fname = $ arr; if (strlen (trim ($ arrPath ["extension"]))> 0) ($ arr = explode (".", $ fname); $ NEWS_ID = intval ($ arr); if ($ NEWS_ID> 0) ($ ID = $ NEWS_ID; $ APPLICATION-> SetTitle ("News Details"); $ sapi = php_sapi_name (); if ($ sapi == "cgi") header ("Status: 200 OK"); else header ("HTTP / 1.1 200 OK "); require_once ($ _ SERVER [" DOCUMENT_ROOT "]." / Bitrix / modules / iblock / iblock.php "); CIblock :: ShowPanel ($ IBLOCK_ID, $ ID); include ($ _ SERVER [" DOCUMENT_ROOT " ]. "/ bitrix / php_interface / include / news / news_detail.php"); // interface script that is called // in /news/detail.php)) require ($ _ SERVER ["DOCUMENT_ROOT"]. "/ bitrix /modules/main/include/epilog.php "); ?>