A
A
Anton2015-08-12 07:41:40
Kohana
Anton, 2015-08-12 07:41:40

CNC pages, alias how best to do?

Hello, did I make the NC and page alias correctly.
Let's say I add news, write a title, this title is added to Alice, and then the link for this news comes out in this form.
https://site.ru/"harbin-mejdu-proshlyim-i-buduschi..."
If the title contains brackets "and various signs, such as ! then he stuffs them into an alias, is that right?
How do search engines treat these pages?
How does this affect indexing and promotion?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
heartdevil, 2015-08-12
@heartdevil

Hello.
Generally speaking, it is not desirable to use quotation marks and other symbols. Everything should be as simple as possible. You can use a hyphen to separate words.
I can’t say about indexing and promotion, but that in practice it complicates the search for a link - that’s for sure.

S
Sergey Ivanov, 2015-08-12
@Writerim

Google definitely loves a more human URL. The fact that there will be problems with promotion is for sure. Will it index in general, it most likely will, but the page rank will be VERY bad. There is documentation on how to make urls in Yandex and Google. Read.

S
Sergey Petrochenko, 2015-08-12
@serg160485

Here are the functions for converting Headers into normal page aliases for cnc + .htaccess + routing and everything will be ok)

function rus2translit($string) {

    $converter = array(

        'а' => 'a',   'б' => 'b',   'в' => 'v',

        'г' => 'g',   'д' => 'd',   'е' => 'e',

        'ё' => 'e',   'ж' => 'zh',  'з' => 'z',

        'и' => 'i',   'й' => 'y',   'к' => 'k',

        'л' => 'l',   'м' => 'm',   'н' => 'n',

        'о' => 'o',   'п' => 'p',   'р' => 'r',

        'с' => 's',   'т' => 't',   'у' => 'u',

        'ф' => 'f',   'х' => 'h',   'ц' => 'c',

        'ч' => 'ch',  'ш' => 'sh',  'щ' => 'sch',

        'ь' => '\'',  'ы' => 'y',   'ъ' => '\'',

        'э' => 'e',   'ю' => 'yu',  'я' => 'ya',

        

        'А' => 'A',   'Б' => 'B',   'В' => 'V',

        'Г' => 'G',   'Д' => 'D',   'Е' => 'E',

        'Ё' => 'E',   'Ж' => 'Zh',  'З' => 'Z',

        'И' => 'I',   'Й' => 'Y',   'К' => 'K',

        'Л' => 'L',   'М' => 'M',   'Н' => 'N',

        'О' => 'O',   'П' => 'P',   'Р' => 'R',

        'С' => 'S',   'Т' => 'T',   'У' => 'U',

        'Ф' => 'F',   'Х' => 'H',   'Ц' => 'C',

        'Ч' => 'Ch',  'Ш' => 'Sh',  'Щ' => 'Sch',

        'Ь' => '\'',  'Ы' => 'Y',   'Ъ' => '\'',

        'Э' => 'E',   'Ю' => 'Yu',  'Я' => 'Ya',

    );

    return strtr($string, $converter);

}

function str2url($str) {

    // переводим в транслит

    $str = rus2translit($str);

    // в нижний регистр

    $str = strtolower($str);

    // заменям все ненужное нам на "-"

    $str = preg_replace('~[^-a-z0-9_]+~u', '-', $str);

    // удаляем начальные и конечные '-'

    $str = trim($str, "-");

    return $str;

}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question