here are the addresses

http://film.lc/index.php/multfilm-Angry-Birds-v-kino/ http://film.lc/index.php/serial-Vodolej/ http://film.lc/index.php/film-V-poiske/ 

exactly what you need

 http://film.lc/multfilms/multfilm-Angry-Birds-v-kino/ http://film.lc/serials/serial-Vodolej/ http://film.lc/films/film-V-poiske/ 

respectively. Addresses a great many trying to solve so

 RewriteCond %{THE_REQUEST}^/index\.php/([a-z0-1]+)-([a-z0-1\-]+)+ RewriteRule ^(.*)$ http://%1/$1s/$1-$2 [L,R=301] 

but nothing, please explain what I am doing wrong and how to

    1 answer 1

    To remove index.php from the link, install instead of your code - like this:

     RewriteEngine On RewriteRule ^index.php$ / [QSA,R] 

    Further, for the structure http://адрес_сайта/категория/название you need to set the formation of this type of links in the site settings.

    • and you can not just remove the link? and add the transfer category name instead of the index? With regular season? - Sergalas
    • You can make the replacement of index.php with the following expression after / and add the "s" to it, but it means that you have such categories - there should be so many such conditions. PS Do you use some kind of CMS or samopinny all? - Legionary
    • I use the framwork yii2 - Sergalas
    • one
      @Sergalas Then I understand that you yourself form the URL, right? Can you show how you do it? - Legionary
    • do you show the entire router? are you sure? - Sergalas